[gclist] Allocator algorithms.
Charles Fiterman
cef@geode.geodesic.com
Tue, 21 May 1996 10:47:12 -0500
> More entertaining yet would be a program that "learned" bad behavior.
> Give it the task of allocating a megabyte of memory, any way it wants
> to, and report its score back to it when it is done, and let it use
> the results from previous runs to pessimize its future behavior.
>
> It also makes sense to consider VM behavior in this exercise -- the
> worst allocator I've ever seen, was terrible because of its VM behavior.
> Every allocation (or maybe every Nth allocation, for small N) walked
> over the entire address space. It was appalling. It was vastly
> slower than any garbage collector I've ever used or heard of.
Many small system allocators are like this. You have a circular first
fit allocator that uses a word length at the front of every object
as its only space overhead. If the scan pointer makes a whole circle
for an allocation it adds more space in some small increment. This
causes it to walk all storage every few allocations. If you have a
640K machine this makes sense.