comparison src/emacs.c @ 18683:ec9c20bede0c

(main) [__NetBSD__]: Round up new stack limit to page bdry.
author Richard M. Stallman <rms@gnu.org>
date Wed, 09 Jul 1997 00:07:19 +0000
parents 38e3a189ed1d
children 231be0c398fd
comparison
equal deleted inserted replaced
18682:28f77aef27b2 18683:ec9c20bede0c
582 if (!getrlimit (RLIMIT_STACK, &rlim)) 582 if (!getrlimit (RLIMIT_STACK, &rlim))
583 { 583 {
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)
590 rlim.rlim_cur = newlim; 597 rlim.rlim_cur = newlim;
591 598