[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] LuaTask 1.6.1
- From: Duck <duck@...>
- Date: Wed, 4 Jul 2007 20:54:43 +1000 (EST)
>Obviously, a small stack may produce other
IIRC Windows will extend the stack of any thread
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.
Indeed...my point is just that IIRC, your concern that "a small stack may
produce other problems" shouldn't be an issue _under Windows_ like it is
under pthreads because thread stacks grow as needed.
So if you start your 1500 threads with 256k each, you'll commit a lot less
memory up front. If some of them need more stack they'll just get given it
at run-time, unlike with pthreads, where the initial committed size is
both the minimum and the maximum allocated to the thread.