You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pragma takes effect at the first function defined after the pragma is seen. Stack probes are neither a part of macros nor of functions that are generated inline.
20
+
This pragma only applies to 32-bit platforms (x86, ARM32). It has no effect on 64-bit platforms.
21
21
22
-
If you don't give an argument for the **`check_stack`** pragma, stack checking reverts to the behavior specified on the command line. For more information, see [Compiler options](../build/reference/compiler-options.md). The interaction of the `#pragma check_stack` and the [`/Gs`](../build/reference/gs-control-stack-checking-calls.md) option is summarized in the following table.
22
+
This pragma takes effect at the first function defined after the pragma is seen. Stack probes are not inserted for macros or functions that are generated inline.
23
23
24
-
### Using the check_stack Pragma
24
+
`#pragma check_stack(off)` / `#pragma Check_stack-` is ignored if the size of the function locals is larger than 4096 or the value specified by `/Gs`.
|`#pragma check_stack( )` or<br /><br /> `#pragma check_stack`| Yes | Turns off stack checking for functions that follow |
29
-
|`#pragma check_stack( )` or<br /><br /> `#pragma check_stack`| No | Turns on stack checking for functions that follow |
30
-
|`#pragma check_stack(on)`<br /><br /> or `#pragma check_stack +`| Yes or No | Turns on stack checking for functions that follow |
31
-
|`#pragma check_stack(off)`<br /><br /> or `#pragma check_stack -`| Yes or No | Turns off stack checking for functions that follow |
26
+
The default behavior of the compiler is to insert stack probes at the beginning of each function if the size of the locals exceeds 4096 or the value specified by `/Gs`.
27
+
28
+
Use [/Gs (Control stack checking calls)](../build/reference/gs-control-stack-checking-calls.md) to change the threshold of the locals that trigger stack probes. Use with caution.
29
+
30
+
Using `#pragma check_stack()` without arguments is deprecated.
0 commit comments