where our memory footprint comes from

Caolán McNamara caolanm at redhat.com
Wed Mar 28 07:14:46 PDT 2012

So, if you now run office under valgrind, i.e.

export VALGRIND=memcheck

then if you kill -SIGUSR2 pid we get memcheck to dump out the backtraces
of active allocations, so can see where what memory we're using comes

a) should add leak-check=full --show-reachable=yes to the valgrind line
in soffice to get full data, should probably add another option/env to
do that automatically for you)

b) only works if you've got a memcheck.h header that was auto-detected
during configure

My last-trace is available from
that's just from an empty writer document

Two main things in there strike me. 
a) configuration data seems to occupy a lot of space
b) there are a lot of __static_initialization_and_destruction entries
where we over-use static rtl::OString or static rtl::OUString's which
all have to be initialized when their .so's are loaded and the
destructors for those registered to be called when they are unloaded.
Way too much churn noise for a few occasionally used strings.


More information about the LibreOffice mailing list