4 lessons
Address spaces and contiguous memory allocation
How the OS hands out physical memory to processes, and the frustrating way free space quietly crumbles into useless crumbs over time.
Paging — cutting memory into interchangeable Lego bricks
The elegant fix for fragmentation, how a page table actually translates addresses, and the real cost of that extra lookup.
Segmentation and multilevel page tables
An alternative memory model based on meaning rather than fixed size, and the trick that stops a page table itself from becoming an enormous memory hog.
Dynamic memory allocation — how malloc actually finds you space
What happens inside the heap every time a program asks for memory at runtime, and the internal fragmentation cost hiding in every allocation.