/STACK (Stack Allocations)
The /STACK option sets the size of the stack in bytes. Use this option only when you build an .exe file.
reserve value specifies the total stack allocation in virtual memory. For ARM, x86 and x64 machines, the default stack size is 1 MB.
commit is subject to interpretation by the operating system. In Windows WindowsRT it specifies the amount of physical memory to allocate at a time. Committed virtual memory causes space to be reserved in the paging file. A higher
commit value saves time when the application needs more stack space, but increases the memory requirements and possibly the startup time. For ARM, x86 and x64 machines, the default commit value is 4 KB.
commit values in decimal or C-language notation.
Another way to set the size of the stack is with the STACKSIZE statement in a module-definition (.def) file. STACKSIZE overrides the Stack Allocations (/STACK) option if both are specified. You can change the stack size after the .exe file is built by using the EDITBIN tool.
To set this linker option in the Visual Studio development environment
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
Select the Linker folder.
Select the System property page.
Modify one of the following properties:
Stack Commit Size
Stack Reserve Size