Stack Frame
noun
say it: “STAK FRAYM” /stæk freɪm/
The record a function call keeps on the call stack: its own parameters and variables, and the spot in the code to go back to.
What is a stack frame?
A stack frame (or just a frame) is the small record a function call gets on the call stack: its own copy of its parameters and local variables, and the spot in the code to go back to when it finishes. Recursion that goes n calls deep keeps n frames waiting, so it uses O(n) memory.
In a sentence
- “Each call to the countdown has its own stack frame, so each one remembers its own number.”
Level: Journeyman · More Data Structures terms at this level
Updated