-qsmallstack
Category
Pragma equivalent
None.
Purpose
Minimizes stack usage where possible. Disables optimizations that increase the size of the stack frame.
Defaults
-qnosmallstack
Usage
Programs that allocate large amounts of data to the stack, such as threaded programs, may result in stack overflows. The -qsmallstack option helps avoid overflows by disabling optimizations that increase the size of the stack frame.
This option is only valid when used together with IPA (the -qipa, -O4, or -O5 compiler options).
Specifying this option may adversely affect program performance.
Predefined macros
None.
Examples
To compile myprogram.c to
use a small stack frame, enter:
xlc myprogram.c -qipa -qsmallstack