Quoting bulia byak <buliabyak@...400...>:
Which numbers were you looking at? Virtual size? RSS? Did you compare Shared? Be aware that all of those are significantly affected by things other than heap allocation.
The next thing I'll test is an Inkscape build from the time when we used the new renderer but didn't use boehm yet. This will show who (renderer or boehm) is guilty of this gobbleage.
That's not a useful comparison; some other substantial things have changed memory-wise as well (SPRepr is now larger, for example, and we use many more shared libraries whose code counts as part of our memory usage).
Since livarot doesn't use the collector yet, you'd be much better off directly comparing the amount of memory allocated using the system allocator versus the amount of memory allocated using libgc's (and their respective heap sizes).
For libgc:
#include <gc/gc.h> int gc_mem_total = GC_get_heap_size(); int gc_mem_unused = GC_get_free_bytes();
note: gc_mem_unused is a pessimistic estimate; compare these numbers immediately before and after a call to GC_gcollect()
For glibc:
#include <malloc.h> struct mallinfo info = mallinfo(); int sys_mem_total = info.arena + info.hblkhd; int sys_mem_unused = info.fordblks;
note: I haven't verified that this is correct (it might be too small)...
Note in both cases that this won't let you blame one allocator or the other -- it's not the fault of an allocator if it's being asked to allocate more memory -- but it will narrow down who has the hungrier clients.
If the standard allocator accounts for most of the memory usage, then we still need to investigate further whether that really means livarot (though I think it is).
Btw, if it looks like a lot is being allocated using the garbage-collected allocator, check how much of that is accounted for in in the variable GC_non_gc_bytes... if that's a large percentage of the gc heap size I might be inclined to blame the present implementation of GC::Anchored.
But any way, at the moment we need to decide: do we release with that bug or not? Mental, please review the original report, try to reproduce, and give us your opinion.
I'll have a look later tonight.
-mental