If you do this with all of your code, it will add up. Besides, you aren't losing anything.
Tim Smith: You didn't read far enough:
quote: CreateThread Documentation
dwStackSize
Specifies the initial commit size of the stack, in bytes. The system rounds this value to the nearest page. If this value is zero, or is smaller than the default commit size, the default is to use the same size as the calling thread.
For more information, see Thread Stack Size.
Here is the Thread Stack Size document:
quote: Thread Stack Size
Each new thread receives its own stack space, consisting of both committed and reserved memory. By default, each thread uses 1 MB of reserved memory, and one page of committed memory. The system will commit one page blocks from the reserved stack memory as needed, until the stack cannot grow any farther.
So, the default is to start at 1 MB and grow in multiples of 4 bytes (page size on a 32-bit OS?).
- null_pointer
Sabre Multimedia
Edited by - null_pointer on 5/5/00 5:00:22 PM
Edited by - null_pointer on 5/5/00 5:04:28 PM