RUST MEMORY LAB

Memory, Ownership & Borrow Visualizer

Loading...
Scenario
Step 1 / 1
Shortcuts: โ† / โ†’ Step  |  Space Play/Pause  |  R Reset  |  Ctrl+K Picker  |  N Tabs  |  M Mode
Static / .rodata
Fixed in binary
The Stack (LIFO)
Fixed-size frames
The Heap
Dynamic & growable

Illustrative model โ€” addresses, capacities and outputs are teaching examples, not measured values.

Static (&'static str)
Stack (Owner / Ptr / Scalar)
Heap Buffer (Owned)
Shared Borrow (&T)
Mutable Borrow (&mut T)