Memory Allocator
Visualize heap memory allocation strategies — First Fit, Best Fit, and Worst Fit.
Category: Engineering
·
v1.0.0
Used
0 KB
Free
256 KB
Fragments
1
Last Op
—
Click on an allocated block in the memory bar to free it.
About This Simulator
See how operating systems manage heap memory. This simulator visualizes a contiguous memory block and demonstrates different allocation strategies. Allocate and free memory blocks to observe fragmentation, compaction needs, and how each strategy (First Fit, Best Fit, Worst Fit) chooses where to place new allocations. Watch external fragmentation grow as blocks are allocated and freed.
How It Works
- Enter a block size and click Allocate to request memory
- Click on any allocated block in the memory bar to free it
- Switch between First Fit, Best Fit, and Worst Fit strategies
- Watch how fragmentation develops over time
- Click Compact to defragment (merge adjacent free blocks)
- Click Reset to start with clean memory