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

Re: "malloc failed"

From
Jeff King <peff@peff.net>
Date
Jan 29, 2009, 05:14 UTC
Message-ID
<20090129051451.GA31507@coredump.intra.peff.net>
In-Reply-To
<3af572ac0901281416x5adef0eak89bd4b40fda52c2b@mail.gmail.com>
On Wed, Jan 28, 2009 at 11:16:32PM +0100, Pau Garcia i Quiles wrote:
Show 11 quoted lines
> My case: I have a 500 MB repository with a 1GB working tree, with
> binary files ranging from 100KB to 50MB and a few thousand source
> files.
> 
> I have two branches ('master' and 'cmake') and the latter has suffered
> a huge hierarchy reorganization.
> 
> When I merge 'master' in 'cmake', if I use the 'subtree' strategy, it
> works fine. If I use any other strategy, after a couple of minutes I
> receive a "malloc failed" and the tree is all messed up. As I said, on
> Linux it works fine, so maybe it's a Windows-specific problem.

Hmm. It very well might be the rename detection allocating a lot of memory to do inexact rename detection. It does try to limit the amount of work, but based on number of files. So if you have a lot of huge files, that might be fooling it.

Try setting merge.renamelimit to something small (but not '0', which means "no limit").

-Peff
Previous: Pau Garcia i Quiles
Message 15 of 15 in “"malloc failed"”
  1. David AbrahamsJan 27, 2009
  2. Shawn O. PearceJan 27, 2009
  3. David AbrahamsJan 27, 2009
  4. Johannes SchindelinJan 27, 2009
  5. Jeff KingJan 28, 2009
  6. David AbrahamsJan 28, 2009
  7. David AbrahamsJan 29, 2009
  8. Jeff KingJan 29, 2009
  9. Jeff KingJan 29, 2009
  10. Junio C HamanoJan 29, 2009
  11. David AbrahamsJan 29, 2009
  12. Andreas EricssonJan 29, 2009
  13. Jeff KingJan 30, 2009
  14. Pau Garcia i QuilesJan 28, 2009
  15. Jeff KingJan 29, 2009

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.