Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 18/05/12 15:38, Arnaud Versini wrote:
Hi,

I checked on Linux and Windows, the memory after a massive allocation
and a massive deallocation is really freed, so currently la raison
d'être of our internal allocator is gone (need to be checked on Mac Os
X). About performance I don't know.

checking "a massive allocation" doesn't really tell us all that much,
because allocators typically operate in 2 modes:
- for large objects, directly request zero-backed memory via mmap
- for small objects, maintain elaborate data structures to allocate
these from arenas or whatever

in the case where a single object is backed by its own mmap it is
trivial for the allocator to unmap the memory on free, and i would
expect every system allocator to do that (even 10 years ago); the far
more interesting case is what happens when a large number of small
objects of different sizes get allocated: is the allocator smart enough
to release the memory when all, or a substantial number of them, are
freed again?

Currently there is a mix of system allocator (or jemalloc) and our
internal allocator. I don't think it is optimal.

I propose to delete all our allocation code and use small stubs for ABI
compatibility until LibreOffice 4.0, and we can use the system allocator
or jemalloc if there is performance issues, perhaps on Windows.

I ask you if I could see if it is a good idea to go on this way or not,
and how (branch or trunk).

i don't think there is any pressing need to do this right now, but of
course you can experiment a bit, i'm also not happy that we maintain our
own allocator, but i'd like to wait for LO4 with actually doing a change.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.