improving rxx_allocator

Aleix Pol aleixpol at kde.org
Thu Feb 24 01:04:39 UTC 2011


On Thu, Feb 24, 2011 at 12:14 AM, floris <flo.ruijt at gmail.com> wrote:

> 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.
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
>
Sounds like a not-so-straightforward optimization.
Is it really faster? what is the improvement using duchainify?

Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110224/4f17bbc2/attachment.html>


More information about the KDevelop-devel mailing list