3.4Operating Systems

Memory Allocator Playground

Allocate and free memory blocks using different strategies. Watch fragmentation build up and compare first-fit, best-fit, worst-fit, and buddy system.

Strategy:
Size:
Allocated
0B
Free
256B
Free Chunks
1
Utilization
0%

Heap (256 bytes)

free
256B
0
256
free[0..255]256B

Activity Log

No activity yet. Allocate some memory!

Quick Actions

First Fit: Fast allocation, but causes fragmentation at the start of the heap.

Best Fit: Minimizes wasted space per allocation, but leaves many tiny unusable holes.

Worst Fit: Leaves largest remaining block, but wastes space.

Buddy: Power-of-2 splits enable fast coalescing, used in Linux kernel.