What is memory fragmentation?

Imagine that you have a “large” (32 bytes) expanse of free memory: ———————————- | | ———————————- Now, allocate some of it (5 allocations): ———————————- |aaaabbccccccddeeee | ———————————- Now, free the first four allocations but not the fifth: ———————————- | eeee | ———————————- Now, try to allocate 16 bytes. Oops, I can’t, even though there’s nearly … Read more