/F (Set Stack Size)
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

/F (Set Stack Size)

Sets the program stack size in bytes.

/F number


The stack size in bytes.

Without this option the stack size defaults to 1 MB. The number argument can be in decimal or C-language notation. The argument can range from 1 to the maximum stack size accepted by the linker. The linker rounds up the specified value to the nearest 4 bytes. The space between /F and numberis optional.

You may need to increase the stack size if your program gets stack-overflow messages.

You can also set the stack size by:

  • Using the /STACK linker option. For more information, see /STACK.

  • Using EDITBIN on the .exe file. For more information, see EDITBIN Reference.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see How to: Open Project Property Pages.

  2. Click the C/C++ folder.

  3. Click the Command Line property page.

  4. Type the compiler option in the Additional Options box.

To set this compiler option programmatically

© 2015 Microsoft