Mail Archives: djgpp/1993/05/10/08:57:45
I wonder if a memory allocator that keeps the blocks sorted by size in
a b-tree might be good. You'd expect to get rapid access to a block
of the approximately correct size ( ln(N) tests ), and since you could
use a best-fit (rather than a first-fit) strategy, there would probably
be less memory fragmentation than the classic list_sorted_by_address
algorithm. Since blocks could be split, and the remainders put back on
the b-tree, you wouldn't have the BSD lack-of-recycling problem.
--Greg Kochanski
- Raw text -