Thread Stack Size
Each new thread or fiber receives its own stack space consisting of both reserved and initially committed memory. The reserved memory size represents the total stack allocation in virtual memory. As such, the reserved size is limited to the virtual address range. The initially committed pages do not utilize physical memory until they are referenced; however, they do remove pages from the system total commit limit, which is the size of the page file plus the size of the physical memory. The system commits additional pages from the reserved stack memory as they are needed, until either the stack reaches the reserved size minus one page (which is used as a guard page to prevent stack overflow) or the system is so low on memory that the operation fails.
ps)
thread 구현은 platform 의존적인 경향이 있으므로, 한마디로 일반화 시킬 수 없겠죠.
MS windows platform에선 에선 실제 해당 stack을 참조하는 순간 물리적 메모리를 할당합니다.
http://msdn.microsoft.com/en-us/library/ms686774%28VS.85%29.aspx
ps)
thread 구현은 platform 의존적인 경향이 있으므로, 한마디로 일반화 시킬 수 없겠죠.
댓글 달기