stack size limits

Lowell Gilbert freebsd-questions-local at
Sat Feb 5 09:52:51 PST 2005

Isaac Yonemoto <ityonemo at> writes:

> I'm trying to adjust the stack size limit on my computer.  I'm not exactly
> sure what to do.  Here's what I've tried:
> ulimit -s (size) 		in bash
> unlimit stacksize unlimited	in csh
> options MAXSSIZE=(size)         in /usr/src/sys/i386/conf/KERNELNAME;
>   make buildkernel
>   make installkernel
> stacksize=infinity              in /etc/login.conf;
>   cap_mkdb /etc/login.conf
> kern.stacksize=(size)           in /etc/sysctl.conf
> but despite all these efforts, doing ulimit -a still seems to show the
> default 64M limit.  Does anyone have any suggestions as to what I should
> have done/should do to increase the size users are allowed to have?

The maximum stack sizes are somewhat tied to the memory map, which is
dependent on the hardware.  

Are you sure you need bigger stacks?  If a task is using that much
stack space on a 32-bit architecture, the program involved probably
needs to be redesigned anyway...

More information about the freebsd-questions mailing list