zone-allocator (Was: optimizing & api-doc)

Mathieu Kooiman kde-optimize@mail.kde.org
Thu, 16 Jan 2003 16:58:37 +0100


Hi,

> In KDE 2.x (1.x??) times the zone-allocator helped KHTML quite nicely. The
> advantages where:
> *) Grouping of related allocations in large blocks: this allows the whole
> block to be returned to the system when no longer needed.
> *) Less overhead per allocation. Dunno what the standard overhead is (4? 8?
> 16 bytes? But if you have a lot of small stuff (e.g. small strings) you can
> safe a significant amount there. (works actually only for char * strings,
> since everything else usually needs to be aligned)
> *) If you are lucky you can skip the free() part and just free the whole
> block at once without bothering to free each object one by one.

<slightly offtopic>
Excuse my ignorance, but doesn't this ZoneAllocator make you implement your 
own "paging" system? and hence still causes that overhead you mention ?

</slightly offtopic)