What Is a Stack Frame?
A stack frame is the region of the call stack pushed when a function is invoked and popped when it returns. It stores the call arguments, local variables, saved registers, and the address to return to. The chain of active frames forms the call stack that debuggers and stack traces display.
Why it matters
Stack frames are why local variables are cleaned up automatically on return and why deep or infinite recursion causes stack overflow. Reading frames is central to interpreting stack traces during debugging.
Related guides
What Is a Tail Call?A tail call is a function call that is the last action in a function, allowing the current stack frame to be…
What Is a Calling Convention in an ABI?A calling convention in an ABI defines how functions pass arguments, return values, and preserve registers so…
What Is a Continuation?A continuation represents the rest of a computation at a given point, as a value that can be invoked later to…