Question about our default pthread stack size

Alexander Nedotsukov bland at
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:

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,

More information about the freebsd-threads mailing list