improving rxx_allocator

floris flo.ruijt at gmail.com
Wed Feb 23 23:14:02 UTC 2011


I've looked into rxx_allocator. At first I had some issues profiling it,
as it were inlined (Valgrind should learn how to profile that anyway).

the previous allocator was not very good. it used a realloc'd array of
pointers to blocks, which would be deleted in the destructor. 

my allocator uses a linked list of blocks, which are put in a static
linked list at the destructor. it uses a QMutex to make sure that no two
threads try to pull the same block.


the other part of this patch are the removal of useless includes of
memorypool.h (which made large parts of kdevelop recompile on every edit
to the allocator) and templating listnode on pool so that it doesn't
need the memorypool.h header in it's own.


More information about the KDevelop-devel mailing list