lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Paul Ducklin <> wrote:
> >Obviously, a small stack may produce other
> >problems.
> IIRC Windows will extend the stack of any thread 
> (there is nothing special about threads on Windows; 
> they're effectively the native task scheduling unit)
> up to the max stack size set in the EXE header, so
> starting with a smaller size for all threads shouldn't
> be a huge problem. The default max stack size is
> IIRC 'all available VM'.

There are two stack size values to specify when linking an exe:
'reserve' and 'commit'. I was only talking about minimising reserved
memory as the amount of committed memory is not that important in this
context anyway.

It is quite feasible to have 1500 threads with most of them using no or
almost no committed memory because they sleep. But all these threads
still need their share of reserved memory. And that's what I was talking

cheers  thomasl

web :