Question about our default pthread stack size

Alexander Nedotsukov bland at FreeBSD.org
Thu Nov 18 23:55:00 PST 2004


Hey guys,

After squashing yet another "too small thread stack size" bug in 
software developed on Linux. I decided to ask gurus for the comment. Why 
we still insist that 64K is good enough for 32bit archs? I do understand 
fact that specs isn't clear about that number and therefore portable 
application must reserve it's own stack. But reality is sucks. Nobody 
cares about it  for the one simple reason the majority of popular OSes 
provides at least megabyte of memory for the purpose by default. More 
other please read what for example Sun tells to developers about stack 
size allocation:

    http://docs.sun.com/app/docs/doc/816-5137/6mba5vpjc?a=view#attrib-33670

How much people will care after reading this?

If there is no any technical issue which prevent us from bumping default 
thread stack size I propose to do this.  If smaller default stack sizes 
gains us some significant benefits let's make it  system wide or per 
process tunable (ie use getrlimit(RLIMIT_STACK)).

All the best,
Alexander.


More information about the freebsd-threads mailing list