memory defragmentation

Jason Baker jbaker at cs.utah.edu
Tue Feb 16 12:42:30 PST 1999


> I know the free block will be merged with its free neighbors once it is
> freed. Will it be possible that a large block can not be allocated in the
> heap because each free block on the list is too small, even though total
> free memory size is large enough? 

Certainly, but the problem is not too severe:  The prim freelist is
searched in address-order, so the bottom of the heap tends to fill up
with long-lived blocks.  Most blocks are freeded near the top of the
heap, where they can often be merged.  (At one point, I printed
allocated block bitmaps, and was surprised by how well this works.)

A mostly copying collector would also have a certain amount of
fragmentation.

Jason


More information about the kaffe mailing list