Virtual Thread Call Stack
Hardware-coordinated virtual memory segment growing toward lower addresses, governed by the RSP stack pointer and RBP base pointer registers.
Determine the physical activation record frame size F_frame from empirical call stack memory allocation across recursive execution depths. Explore interactive search algorithms, compare operation counts and analyse complexity scaling.
Ready to execute recursion depth benchmark.
Adjust recursion depth n, then execute benchmark.
Operation counts are generated deterministically by the exact algorithmic execution model. Modern hardware benchmarks additionally reflect cache line prefetching and branch misprediction penalties.
The simulated execution model evaluates idealized thread call stack memory allocation under the System V AMD64 ABI specification with fixed 64-byte activation frames and an initial 128-byte runtime CRT base frame. In physical hardware, virtual memory pages (typically 4096 bytes) are committed by the operating system kernel on-demand via page fault demand paging, meaning physical RAM allocation increases in discrete page steps rather than continuous byte increments. Furthermore, modern optimizing compilers employ aggressive function inlining, leaf-function frame elision, and register parameter passing that can reduce or eliminate activation records for small functions, while debug builds with stack canaries and sanitizers (e.g., AddressSanitizer ASan) increase frame footprints significantly. The simulated benchmark environment reflects strict x86-64 System V AMD64 ABI memory alignment rules, where each activation record consumes exactly 64 bytes of thread stack memory (8 bytes return address, 8 bytes saved RBP, 16 bytes callee-saved registers, and 32 bytes local variable allocation and stack alignment padding). An initial 128-byte base frame represents the runtime C-runtime (CRT) startup wrapper. Consequently, peak stack allocation follows the exact linear relationship M(n) = 64.0000 · n + 128.0000 bytes, providing an ideal microarchitectural testbed for Ordinary Least-Squares regression.
Hardware-coordinated virtual memory segment growing toward lower addresses, governed by the RSP stack pointer and RBP base pointer registers.
Microarchitectural call frame generator allocating 64-byte structured records containing return address, saved frame pointer, registers, and local variable slots.
High-precision computational state monitor tracking push, pop, and peek transaction latencies and stack watermark depth.
Hardware memory management unit boundary monitor detecting out-of-bounds stack pointer violations and triggering kernel SIGSEGV signals on overflow.
Deterministic context-free grammar parser employing dual operand and operator stacks to validate balanced delimiters and evaluate infix arithmetic.
Non-intrusive runtime telemetry instrumentation measuring peak byte displacements of the RSP stack pointer register relative to thread base.
Determine the physical activation record frame size F_frame from empirical call stack memory allocation across recursive execution depths. Suggested independent settings: 128, 256, 512, 1024, 2048, 4096, 8192 frames.
Configure the virtual machine runtime with standard 16-byte stack boundary alignment and verify that the base runtime startup frame M_0 is recorded at exactly 128 bytes.
Adjust the independent variable control slider to choose a target recursion depth n between 128 and 8,192 frames across the designated power-of-two benchmark points.
Trigger the recursive execution engine, initiating sequential CALL instructions that push return addresses, establish RBP frame links, and decrement the RSP register by 64 bytes per frame.
Upon reaching the base-case conditional termination, read the maximum byte displacement M = 64n + 128 bytes from the MMU telemetry profiler before unwinding the call stack.
Commit the independent depth n (frames) and dependent memory allocation M (bytes) into the laboratory notebook table and plot the corresponding data coordinate.
Construct the ordinary least-squares regression line M = F_frame · n + M_0 across all seven benchmark trials to extract the physical frame size F_frame and verify agreement with the ABI standard.
Points are your recorded benchmark observations. The regression line validates Stack ADT & Call Stack Memory complexity scaling.
| # | Call stack recursion depth n (frames) (frames) | Peak stack memory consumption M (bytes) | Recursion depth n (frames) | Peak stack memory M (bytes) | Remove |
|---|
No readings yet. Execute a recursion depth benchmark and record it.