Share via


/STACK (Windows CE 5.0)

Send Feedback

This option sets the size of the stack in bytes. This option is only for use when building a .exe.

/STACK:reserve[,commit]

Remarks

This option specifies the total stack allocation in virtual memory. The default stack size is 1 MB. The linker rounds up the specified value to the nearest 4 bytes.

The optional value specified in the Commit text box (or in the commit argument on the command line) is subject to interpretation by the operating system. In Windows NT, 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 memory requirements and possibly the startup time.

Specify the reserve and 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 - Stack Allocations option if both are specified. You can change the stack after the .exe file is built by using the EDITBIN tool.

See Also

Linker Options

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.