[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[E-devel] Memory pool management
I have maid with the help of Olivier a little library that could, I hope,
improve memory management in enlightenment.
The idea behind it was to provide a fast allocator which improve data
locality when manipulating the same object. For that purpose, the library
provide a set of function for the manipulation of memory pool dedicated to a
specific type (size in fact) of object. It also provide another memory pool
for data without the size known when the memory pool is initialised (it use
multiple memory pool for fixed size, a little bit like the kernel).
I have also made a patch for eet_lib.c (after a little valgrind check, it
seems to be the most used part of enlightenment) and it improve a little bit
the performance. Well without the patch, I wasn't patient enough to see the
menu of enlightenment, with it I didn't need to be patient :-) This patch is
not very clean as I didn't know when the initialisation process took place, I
just check in all function that use the memory pool, if it's correctly
initialized. I am sure, we can come with a better solution.
You will find every thing here: http://chac.le-poulpe.net/~cedric/ememoa/
If you want a maximum speed for this library, set CFLAGS to "-O3
I must thanks Olivier for all the autotools stuff, the reviewing of the code
and also for the name of the library.
I don't know if you are interested in more patch for this type of memory
management (Seems ecore_list and evas_list could also benefit from this). But
some part of EFL and enlightenment couldn't benefit from it, because the
allocation is done by fonction at the end of the call tree (take for example
the data chunk used by eet in eet_read). This force the caller to free it,
and the called is forced to allocate it without knowing what usage the caller
will do with the data. I really don't know what to do about this, but I think
it certainly has a performance impact on enlightenment.
In any case, I hope this library would be usefull for this project,