Chapter 16. A Thread’s Stack

Sometimes the system reserves regions in your own process’ address space. I mentioned in Chapter 13, that this happens for process and thread environment blocks. Another time that the system reserves regions in your own process’ address space is for a thread’s stack.

Whenever a thread is created, the system reserves a region of address space for the thread’s stack (each thread gets its very own stack) and also commits some physical storage to this reserved region. By default, the system reserves 1 MB of address space and commits two pages of storage. However, these defaults can be changed by specifying either the /F

Get Windows® via C/C++, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.