The Stack The stack is used by the process to store the chain of functions which are currently in the middle of execution. Each function call causes the process to add an execution frame to the top of the stack. This frame contains the contents of CPU registers as they were before the function call, the return address (i.e. where in the code this function was invoked, so we can return there after the call), the parameters of the function and all its local variables.