### /STACK Linker Option

Syntax: | Default:
/ST[ACK]:reserve /ST[ACK]:reserve [,commit] | Combined size of all sections with combine type=stack. /STACK:0x100000,0x1000

Use /STACK to set the stack size (in bytes) of your program. The size must be an even number from 0 to 0xFfffFffe. If you specify an odd number, it is rounded up to the next even number.

The linker uses the larger of the default value and specified value.

reserve indicates the total virtual address space reserved. commit sets the amount of physical memory to allocate initially. When commit is less than reserve, memory demands are reduced, although execution time may be slower.

Stack Allocation

Summary of Linker Options