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

Re: [patch] possible memory leak in diff.c::diff_free_filepair()

From
Yasushi SHOJI <yashi@atmark-techno.com>
Date
Aug 16, 2005, 03:05 UTC
Message-ID
<8764u6ponn.wl@mail2.atmark-techno.com>
In-Reply-To
<7viry9le0g.fsf@assigned-by-dhcp.cox.net>

At Sat, 13 Aug 2005 14:31:59 -0700, Junio C Hamano wrote:

Show 12 quoted lines
> 
> Yasushi SHOJI <yashi@atmark-techno.com> writes:
> 
> > oops.  probably my english wasn't clear. my patch fixes
> > diff_free_filepair().
> 
> When the command is run on linux-2.6 repository, virtual memory
> consumption of git-diff-tree command skyrockets to about half a
> gig, because it maps all files in two adjacent revisions of the
> entire kernel tree.  But it seems to reclaim things reasonably
> well and goes back down to less than 10m when it starts to
> process the next commit pair.

it tunes out that, at least for my problem is to populating filespec data in parepare_temp_file() and not freeing it after creating temp file with prep_temp_blob().

parepare_temp_file() and diff_populate_filespec() has a lot in similarity. so it'd be nice to refactor some. and re-introduce diff_free_filespec_data() and call right after prep_temp_blob() in prepare_temp_file().

Junio, did you also mean to clean-up these functions when you said in the thread of "Re: gitweb - option to disable rename detection"?

regards,
--
         yashi
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “possible memory leak in diff.c::diff_free_filepair()”
  1. possible memory leak in diff.c::diff_free_filepair()Yasushi SHOJI, Aug 13, 2005
  2. Junio C HamanoAug 13, 2005
  3. Yasushi SHOJIAug 13, 2005
  4. Junio C HamanoAug 13, 2005
  5. Yasushi SHOJIAug 16, 2005
  6. Junio C HamanoAug 16, 2005
  7. Yasushi SHOJIAug 21, 2005

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.