[fpc-devel] Re: Compiler bottlenecks
Michael Schnell
mschnell at lumino.de
Thu Jul 15 11:26:57 CEST 2010
On 07/15/2010 11:14 AM, Jonas Maebe wrote:
> Then please explain that paradigm, since apparently you already looked
> at it.
AFAIU, they use three areas for small midrange and large chunks
Small chunks are allocated in several lists, each of which hosts equally
sized chunks, thus finding the chunks is a one-step access (no linked
lists). Thus no unification of chunks when freeing is necessary. With a
"normal" program some 98 % of the chunks are small.
Midrange Chunks are allocated in a single list of non equally sized chunks
Large chunks are allocated by a direct OS API call.
Only Midrange chunks implement "atomic" management for thread-safeness.
For large chunks, the OS does this anyway, If a conflicting access is
detected with small chunks, the second thread simply uses a midrange
chunk in that rare occasion.
-Michael
More information about the fpc-devel
mailing list