On 10/27/2010 12:53 PM, Eric Covener wrote: >> I'd set my ThreadStackSize really low, to 64 KB, and while that usually lets >> you run without trouble > > I was just about to document that _lowering_ the stack size with > ThreadStackSize is unreliable since the underlying call used only sets > a _minimum_ stack size, not an actual one.
It's not a pre-allocation, AIUI. It is the ceiling to which the stack may grow, at which point it's probably bumping up against the next thread's own stack. Especially with 32-bit execution, this becomes critical for worker/event etc, because 1024mb reservations would allow only 1024 stacks (or threads) to sit within a typical 1GB window of potential stack allocations. Dropping it to 64kb (which probably would not work!) provides 16k stacks. > Did you have any extenuating circumstances (old linux, alternate > thread library, ulimit -s already set below 128?) Always a good question.
