Le 30/09/2011 08:56, Tommaso Cucinotta a écrit :
Ok, please, find attached the obtained output parsed with ms_print.
Now, what do I do with this monster :-) ?
Where's the info about memory leaks ?
It is not necessarily a problem of memory leak (could be an ever-growing
cache, for example). Here is in attachment a condensed view of a small
part of the file, around snapshots 65 to 70. Only 69 and 70 are detailed
snapshots here.
What do we see?
1/ there is a continuous drift of memory use
2/ the most important part is the agregation of small allocations (not
very useful...)
3/ the second one is related to font loading by qt (remains stable)
4/ the third one is the allocation of docstrings, stable too.
From 69 to 70, the increase is ~150k, and most of it is in the first
agregated chunk. To understand what happens, you need to lower the 1%
threshold (both when calling massif and ms_print) to maybe 0.5%, or at
least until we see what is the particular stack trace which importance
grows.
Does this help?
JMarc
--------------------------------------------------------------------------------
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
65 1,238,614,101 9,616,856 8,504,801 1,112,055 0
66 1,250,131,377 9,645,120 8,529,548 1,115,572 0
67 1,261,997,511 9,667,336 8,548,822 1,118,514 0
68 1,273,519,281 9,689,888 8,570,830 1,119,058 0
69 1,279,388,951 9,756,152 8,623,946 1,132,206 0
88.39% (8,623,946B) (heap allocation functions) malloc/new/new[], --alloc-fns,
etc.
->29.13% (2,842,300B) in 1316 places, all below massif's threshold (01.00%)
->26.13% (2,549,408B) 0x698CDD8: _hb_alloc (harfbuzz-impl.c:41)
->05.89% (574,444B) 0x44543F: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_create(unsigned
long, unsigned long, std::allocator<wchar_t> const&) (new_allocator.h:89)
--------------------------------------------------------------------------------
n time(i) total(B) useful-heap(B) extra-heap(B) stacks(B)
--------------------------------------------------------------------------------
70 1,282,814,971 9,904,416 8,779,957 1,124,459 0
88.65% (8,779,957B) (heap allocation functions) malloc/new/new[], --alloc-fns,
etc.
->29.90% (2,960,927B) in 1331 places, all below massif's threshold (01.00%)
->25.74% (2,549,408B) 0x698CDD8: _hb_alloc (harfbuzz-impl.c:41)
->05.80% (574,444B) 0x44543F: std::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_create(unsigned
long, unsigned long, std::allocator<wchar_t> const&) (new_allocator.h:89)