Subject: kern/2807: maximum stack size set too low
To: None <>
From: Greg Lindahl <>
List: netbsd-bugs
Date: 10/05/1996 19:58:21
>Number:         2807
>Category:       kern
>Synopsis:       maximum stack size set too low
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Oct  5 17:05:00 1996
D. E. Shaw & Co.
>Release:        1.2_BETA
System: NetBSD 1.2A NetBSD 1.2A (X25) #0: Wed Sep 18 08:33:46 EDT 1996 i386


The default maximum stack size (use limit -h to view it) is set to
8 megabytes by default on the i386 kernel. This is fine if you are
imagining that all your programs malloc their data storage and a
big stack means runaway recursion. But many programs, especially
numerical C programs or fortran programs compiled with f2c -a, put
a lot of data on the stack for good reason. For this reason, the
maximum stack size ought to be the same as the maximum data size.

It is true that a user could always raise the limit for their
kernel, but requiring a kernel recompile to run a program which
uses 9 megabytes of core is a bit much...

Christos says that XFree86 and Tcl/Tk also have a problem with thi
being set too low.

Many architectures have this set to be the same as max data size,
but alpha, amiga, arm32, i386, pc532, and vax have it set lower.


Compile my hydrocode with static variables, watch it work, compile
with automatic variables, watch it segv, debug for an hour scratching
your head, then realize...


edit /usr/src/sys/arch/*/include/vmparam.h