diff options
| author | Richard M. Stallman | 1997-07-09 00:07:19 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-09 00:07:19 +0000 |
| commit | d0381a7fa3f50d1042a2372eb23b6f03299aaaa5 (patch) | |
| tree | 82e0e1d9f3c26bbcac2d7917d91e6359d32266f6 /src | |
| parent | a1c9b4d08012aa6794ad817904596265aa3e6d55 (diff) | |
| download | emacs-d0381a7fa3f50d1042a2372eb23b6f03299aaaa5.tar.gz emacs-d0381a7fa3f50d1042a2372eb23b6f03299aaaa5.zip | |
(main) [__NetBSD__]: Round up new stack limit to page bdry.
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c index e29724a38d7..43f8d27b3ea 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -584,6 +584,13 @@ main (argc, argv, envp) | |||
| 584 | long newlim; | 584 | long newlim; |
| 585 | /* Approximate the amount regex.c needs, plus some more. */ | 585 | /* Approximate the amount regex.c needs, plus some more. */ |
| 586 | newlim = 800000 * sizeof (char *); | 586 | newlim = 800000 * sizeof (char *); |
| 587 | #ifdef __NetBSD__ | ||
| 588 | /* NetBSD (at least NetBSD 1.2G and former) has a bug in its | ||
| 589 | stack allocation routine for new process that the allocation | ||
| 590 | fails if stack limit is not on page boundary. So, round up the | ||
| 591 | new limit to page boundary. */ | ||
| 592 | newlim = (newlim + getpagesize () - 1) / getpagesize () * getpagesize(); | ||
| 593 | #endif | ||
| 587 | if (newlim > rlim.rlim_max) | 594 | if (newlim > rlim.rlim_max) |
| 588 | newlim = rlim.rlim_max; | 595 | newlim = rlim.rlim_max; |
| 589 | if (rlim.rlim_cur < newlim) | 596 | if (rlim.rlim_cur < newlim) |