The five steps
- malloc and free 8 min
- realloc and free space 9 min
- Best fit 10 min
- Compaction 10 min
- Thousands of holes 11 min
Hand out blocks of one contiguous region the way malloc does: first fit, free with coalescing, realloc that grows in place when it can, best fit to fight fragmentation, compaction, and a free-space index that stays fast with thousands of holes.