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

git gc exit with out of memory, malloc failed error

From
Alexander Kostikov <alex.kostikov@gmail.com>
Date
Sep 15, 2011, 01:33 UTC
Message-ID
<CAGAhT3mbGB-0q3EKh5MrGqB59wUea7NfaaY18DvnL3qimwh9QA@mail.gmail.com>
I'm new to git and I'm getting the following out of memory error on git gc:

$ git gc Counting objects: 80818, done. Delta compression using up to 8 threads. fatal: Out of memory, malloc failed (tried to allocate 24359675 bytes) error: failed to run repack

The only advice I found in the internet suggested to run repack with --window-memory parameter specified. But this call also fails:

$ git repack -adf --window-memory=0 Counting objects: 80818, done. Delta compression using up to 8 threads. warning: suboptimal pack - out of memory fatal: Out of memory, malloc failed (tried to allocate 24356363 bytes)

How do I cleanup my repository?

$ git version git version 1.7.6.msysgit.0

OS: Windows Server 2008 R2 SP1 (x64)
Physical memory: 24 GB
The commands listed were executed under x64 console process.
-- 
Thanks,
Alexander Kostikov
Next: David Michael Barr
Message 1 of 5 in “git gc exit with out of memory, malloc failed error”
  1. Alexander KostikovSep 15, 2011
  2. David Michael BarrSep 15, 2011
  3. Alexander KostikovSep 15, 2011
  4. Brandon CaseySep 15, 2011
  5. Carlos Martín NietoSep 15, 2011

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.