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

Re: [PATCH 2/2] pack-bitmap: add free function

From
Jeff King <peff@peff.net>
Date
Jun 9, 2018, 06:06 UTC
Message-ID
<20180609060621.GB30224@sigill.intra.peff.net>
In-Reply-To
<b9be1d0371e5dc694e5e7ac88a900f985faabec8.1528397984.git.jonathantanmy@google.com>
On Thu, Jun 07, 2018 at 12:04:14PM -0700, Jonathan Tan wrote:
Show 7 quoted lines
> Add a function to free struct bitmap_index instances, and use it where
> needed (except when rebuild_existing_bitmaps() is used, since it creates
> references to the bitmaps within the struct bitmap_index passed to it).
> 
> Note that the hashes field in struct bitmap_index is not freed because
> it points to another field within the same struct. The documentation for
> that field has been updated to clarify that.

Hrm, this one fixes the leaks I noticed in the previous patch. I'm OK with doing it separately if it breaking it down this way makes the code easier to reason about. But we should probably say something in the commit message about it.

-Peff
Previous: Jonathan TanNext: Jonathan Tan
Message 3 of 9 in “Object store refactoring: make bitmap_git not global”
  1. 0/2 Object store refactoring: make bitmap_git not globalJonathan Tan, Jun 7, 2018
  2. 2/2 pack-bitmap: add free functionJonathan Tan, Jun 7, 2018
  3. Jeff KingJun 9, 2018
  4. 1/2 pack-bitmap: remove bitmap_git global variableJonathan Tan, Jun 7, 2018
  5. Jeff KingJun 9, 2018
  6. Jonathan TanJun 11, 2018
  7. Jeff KingJun 11, 2018
  8. Stefan BellerJun 12, 2018
  9. Brandon WilliamsJun 25, 2018

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.