|
From: Oswald B. <os...@kd...> - 2007-07-13 11:11:06
|
On Fri, Jul 13, 2007 at 09:57:47AM +0100, Julian Seward wrote: > > Each arena has a set of N_MALLOC_LISTS circular double-linked lists of > > free blocks, classified by size (see pszB_to_listNo). I think each > > list arbitrarily travels across all the Superblocks in the Arena. > > The arena's freelist[] array contains pointers to some arbitrary entry > > point in each list. > > (more) > > The mapping from block sizes to list numbers, and the number of lists, > is entirely arbitrary. The only requirement is that all block sizes get > mapped to one of the lists. The current scheme tends to work fairly > well but maybe you can find something better. > lists suck. trees are better. :) you might find some inspiration in the xfs allocator. on a related note, in the linux kernel allocation is a very hot topic currently - maybe that can be used somehow. -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. |