Live Go Code Runner & Playground
Edit code, switch presets, and execute in real-time.
Interactive Stack, Heap & Variable Stepper
Step through code frame by frame to observe stack allocation, heap escape, pointers, and channel queues in real time.
Allocate x on the stack with value 10.
- •Stack vs Heap: Local variables remain on the stack unless a pointer outlives the creating function frame.
- •Slice Growth: Appending beyond capacity allocates a new doubled backing array in heap memory.
- •Channels: Blocked sends and receives light up immediately until rendezvous synchronization.
Channel Visualizer & Deadlock Detector
Visualize buffered vs unbuffered channels, blocking sends/receives, and concurrent event pipelines.
Channels
Send/Receive Visual Debugger
See buffered vs unbuffered behavior, blocking, and readiness.
Go GMP Runtime Scheduler
Inspect how Goroutines (G), OS Threads (M), and Logical Processors (P) cooperate with work-stealing queues.
Scheduler
Goroutine / M:N Scheduler View
Visualize Ps, run queues, runnable vs waiting goroutines, and dispatch/steal.
Slice Memory Lab & Doubling Strategy
Inspect the 24-byte Slice Header struct (pointer, length, capacity) and watch memory growth algorithms.
Slices
Slice Growth Lab
Append elements, watch len/cap, and see when the underlying array reallocates (generation changes).
Generation (pointer identity): ptr-0x1 (same backing array)
Notes
- • len grows with each append.
- • cap doubles when len exceeds cap (simplified heuristic).
- • generation increments on reallocation (pointer changes).
- • Sharing slices? If generation changes, old aliases break.