#pragma alloca

C only


The #pragma alloca directive specifies that the compiler should provide an inline version of the function alloca(size_tsize). The function alloca(size_tsize) can be used to allocate space for an object. The amount of space allocated is determined by the value of size, which is measured in bytes. The allocated space is put on the stack.


Read syntax diagramSkip visual syntax diagram>>-#--pragma--alloca-------------------------------------------><


You must specify the #pragma alloca directive, or either of the -qalloca or -ma compiler options to have the compiler provide an inline version of alloca.

Once specified, #pragma alloca applies to the rest of the file and cannot be turned off. If a source file contains any functions that you want compiled without #pragma alloca, place these functions in a different file.

Related information