Dynamic memory allocation

malloc carves blocks out of the heap with headers and footers, finds free blocks from a free list, and splits and coalesces them to fight fragmentation.

From Computer systems, a programmer's view.