Lab / Memory Allocator Visualizer
🧱

Memory Allocator Visualizer

Visualize how heap memory allocation works with malloc/free operations. Compare strategies, watch fragmentation build up, and observe free block coalescing.

Use the first free block that is large enough

Fragmentation Metrics

Total Memory512B
Used Memory0B
Free Memory512B
Fragmentation0%
Largest Free512B
Total Blocks1
Free Blocks1

Allocated Blocks

No blocks allocated

Click a block to free it

Presets

Operation History

infoHeap initialized: 512 bytes
Allocated
Metadata (8B header)
Free

All allocation runs entirely in your browser. No data is sent anywhere.