git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Linus TorvaldsNext: Nicolas Pitre
Message 6 of 7 in “dmalloc and leaks in git”
  1. Jon SmirlDec 8, 2007
  2. Johannes SchindelinDec 8, 2007
  3. Jon SmirlDec 8, 2007
  4. Johannes SchindelinDec 8, 2007
  5. Linus TorvaldsDec 9, 2007
  6. Linus TorvaldsDec 10, 2007
  7. Nicolas PitreDec 10, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.