| description | Learn more about: /F (Set Stack Size) | |||||
|---|---|---|---|---|---|---|
| title | /F (Set Stack Size) | |||||
| ms.date | 06/22/2021 | |||||
| f1_keywords |
|
|||||
| helpviewer_keywords |
|
|||||
| ms.assetid | 17320b6f-8305-445b-9ec2-75833f4b29e0 |
Sets the program stack size in bytes.
/Fnumber
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 multiple of 4 bytes. The space between /F and number is optional.
You may need to increase the stack size if your program gets stack-overflow messages at runtime.
You can also set the stack size by:
-
Using the
/STACKlinker option. For more information, see/STACK(Stack allocations). -
Using EDITBIN on the EXE file. For more information, see EDITBIN reference.
-
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
-
Select the Configuration Properties > C/C++ > Command Line property page.
-
Enter the compiler option in the Additional Options box.
- See xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A.