Thin Lock Implementation

Jb jb at nowhere.com
Tue Aug 19 08:59:31 PDT 2008


"Sascha Katzner" <sorry.no at spam.invalid> wrote in message 
news:g8emle$1bad$1 at digitalmars.com...
> Steven Schveighoffer wrote:
>> On a 32-bit system, the amount of addressable memory space and the
>> stack size are the factors that limit the number of threads.  For
>> example, if addressable space is 2GB, and each thread has a 1MB
>> stack, that's 2000 threads max (this is the typical situation for
>> Windows).
>
> Not exactly right, since the stack is organized in 4kb pages and these
> pages are not initialized until they are first used they usually require
> a lot less than 1mb.

The allocation granularity is actualy 64k chunks on most (at least all that 
ive ever used) windows OSes.

The 4k granulary is for the protection status.

Which i've always thought was a bit odd. 





More information about the Digitalmars-d mailing list