[DGD] Values for chunk sizes

Felix A. Croes felix at dworkin.nl
Sat Jan 6 02:31:10 CET 2007


Shentino <shentino at gmail.com> wrote:

> I've recently noticed a pattern in chunks izes...
>
> Each one seems to follow the pattern of "power of 2 minus 1K", and
> static chunk is usually 1/4 the size of dynamic chunk.
>
> Is this just a coincidence or is there something magical about "2^k -
> 1K" as a chunk size?

DGD's memory manager is built on top of the system's memory manager.
Many of those have a preference for allocating blocks of particular
sizes.  I picked these chuck sizes in the hope that little memory
would be wasted.

Regards,
Dworkin



More information about the DGD mailing list