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

Re: [GSoC14][RFC] Proposal Draft: Refactor tempfile handling

From
Jeff King <peff@peff.net>
Date
Mar 11, 2014, 18:05 UTC
Message-ID
<20140311180559.GB28154@sigill.intra.peff.net>
In-Reply-To
<531F3959.4060608@alum.mit.edu>
On Tue, Mar 11, 2014 at 05:27:05PM +0100, Michael Haggerty wrote:
Show 8 quoted lines
> Thanks for your proposal.  I have a technical point that I think your
> proposal should address:
> 
> Currently the linked list of lockfiles only grows, never shrinks.  Once
> an object has been linked into the list, there is no way to remove it
> again even after the lock has been released.  So if a lock needs to be
> created dynamically at a random place in the code, its memory is
> unavoidably leaked.

Thanks, I remember thinking about this when I originally conceived of the idea, but I forgot to mention it in the idea writeup.

In most cases the potential leaks are finite and small, but object creation and diff tempfiles could both be unbounded. So this is definitely something to consider. In both cases we have a bounded number of _simultaneous_ tempfiles, so one strategy could be to continue using static objects. But it should not be hard to do it dynamically, and I suspect the resulting API will be a lot easier to comprehend.

-Peff
Previous: Michael HaggertyNext: Brian Gesiak
Message 6 of 7 in “[GSoC14][RFC] Proposal Draft: Refactor tempfile handling”
  1. Brian GesiakMar 1, 2014
  2. Jeff KingMar 3, 2014
  3. Brian GesiakMar 8, 2014
  4. Jeff KingMar 11, 2014
  5. Michael HaggertyMar 11, 2014
  6. Jeff KingMar 11, 2014
  7. Brian GesiakMar 12, 2014

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.