Re: dmalloc and leaks in git
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Dec 10, 2007, 16:34 UTC
- Message-ID
- <alpine.LFD.0.9999.0712100828590.12046@woody.linux-foundation.org>
- In-Reply-To
- <alpine.LFD.0.9999.0712091251330.12046@woody.linux-foundation.org>
On Sun, 9 Dec 2007, Linus Torvalds wrote:
> > For example, if you use > > valgrind --tool=massif --heap=yes ...
I tried this on my copy of the gcc thing, but I didn't do the extreme packing thing, so I never saw the 3.4GB usage. Massif just reported a 200M heap, and about half of that was "add_object_entry".
Of course, that doesn't report any mmap usage at all, so it totally ignores the mapping of the original pack-file itself (which will obviously be totally dense by the end, since we look at all objects).
It also doesn't take into account various secondary effects. For example, I don't think it looks at heap fragmentation issues etc, which normally aren't a noticeable thing, but maybe some particular allocation pattern can make the glibc allocator waste horrid amounts of memory or something like that.
Linus