Data Stacks

The compiler can implement two types of data stack: a compiled stack and a software stack. Both these stacks are for storing stack-based variables which have automatic storage duration, such as auto, parameter, and temporary variables.

Either one or both of these types of stacks may be used by a program. Compiler options, specifiers and how the functions are called will dictate which stacks are used. See Automatic Storage Duration Objects for more information on how the compiler allocates a function’s stack-based objects.

A section, called stack, reserves the memory used by the stack.