Question

What's the overhead of a thread on 64bit windows? I believe it was 1mb of userspace for the stack and a smaller amount of kernel space in 32bit.

Thanks

Was it helpful?

Solution

It can be whatever you want. The CreateThread() API lets you specify stack size. If you call it with a stack size of 0, it will use the stack defined in the executable file header, which can be set via a linker option. The default value (for both x86 & x64 systems) is 1MB.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top