diff options
author | Richard M. Stallman <[email protected]> | 1997-07-09 00:07:19 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1997-07-09 00:07:19 +0000 |
commit | d0381a7fa3f50d1042a2372eb23b6f03299aaaa5 (patch) | |
tree | 82e0e1d9f3c26bbcac2d7917d91e6359d32266f6 /src | |
parent | a1c9b4d08012aa6794ad817904596265aa3e6d55 (diff) |
(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 e29724a38d..43f8d27b3e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -584,6 +584,13 @@ main (argc, argv, envp) long newlim; /* Approximate the amount regex.c needs, plus some more. */ newlim = 800000 * sizeof (char *); +#ifdef __NetBSD__ + /* NetBSD (at least NetBSD 1.2G and former) has a bug in its + stack allocation routine for new process that the allocation + fails if stack limit is not on page boundary. So, round up the + new limit to page boundary. */ + newlim = (newlim + getpagesize () - 1) / getpagesize () * getpagesize(); +#endif if (newlim > rlim.rlim_max) newlim = rlim.rlim_max; if (rlim.rlim_cur < newlim) |