Stack frame
A stack frame is a runtime record that holds the local context and execution state for one active function or method invocation.
.NET in Action, Second Edition
A stack frame is the portion of a call stack containing a function invocation's local data, arguments, and return information.
- How it is used
- Uses frames to connect CPU-profile samples to executing methods and to explain call-stack behavior.
- How deep it goes
- Explains invocation data, call order, recursion, and profile operations through a simplified stack model, without specifying an exact runtime layout.
- Examples
- Traces nested method calls, compares stack and heap arrays, and applies PerfView filters, folds, and groups.
- What you can do after
- Diagnose/debug with PerfView by reading sampled call stacks and reducing irrelevant frames with filters, folds, and groups.
Read how .NET in Action, Second Edition explains stack frame →
Rust in Action: Systems programming concepts and techniques
A stack frame is a per-function-call memory record containing call state, arguments, local variables, and return information.
- How it is used
- Explains how function calls preserve state in memory and support return control and exception traversal.
- How deep it goes
- Explains frame contents, LIFO behavior, stack-pointer movement, and unwinding, but stops short of frame-layout implementation details.
- Examples
- Uses a dinner-plate comparison, a Rust password-checking function, and FledgeOS exception unwinding.
- What you can do after
- Evaluate and understand how calls, returns, and exception unwinding move through function-specific memory records.
Read how Rust in Action: Systems programming concepts and techniques explains stack frame →
100 Go Mistakes and How to Avoid Them
A stack frame is the runtime record containing a function invocation's local state and associated execution information.
- How it is used
- Explains local storage, function-call behavior, pointer validity, and stack-versus-heap allocation consequences.
- How deep it goes
- Traces frame creation and retirement through nested calls, stopping short of detailed runtime allocation internals.
- Examples
- Uses sumValue, sumPtr, stack diagrams, and allocation benchmarks to contrast value and pointer results.
- What you can do after
- Evaluate function-local storage and diagnose pointer-lifetime and allocation effects using execution traces and benchmarks.
Read how 100 Go Mistakes and How to Avoid Them explains stack frame →
Related concepts
- execution context stackpart of · An execution context stack is a runtime last-in-first-out structure that records active function or method calls and their execution state and return information.
- stackpart of · A stack is a data structure that adds and removes elements at one end, following last-in, first-out order.
- setjmp/longjmpused by · The setjmp/longjmp mechanism is a C nonlocal-control-flow facility that saves an execution context and later restores it to transfer control across function-call boundaries.
- generatorused by · A generator is a language construct or computation that produces values incrementally on demand, typically suspending and resuming while preserving its state.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


