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

Re: "malloc failed"

From
Jeff King <peff@peff.net>
Date
Jan 30, 2009, 04:49 UTC
Message-ID
<20090130044919.GA18655@coredump.intra.peff.net>
In-Reply-To
<87pri6qmvm.fsf@mcbain.luannocracy.com>
On Thu, Jan 29, 2009 at 08:10:05AM -0500, David Abrahams wrote:
> Good work.  I don't know if this matters to you, but I think on a 32-bit
> platform you'll find that size_t, which is supposed to be able to hold
> the size of the largest representable *memory block*, is only 4 bytes
> large:

That should be fine; 32-bit systems can't deal with such large files anyway, since we want to address the whole thing. Getting around that would, as Andreas mentioned, involve dealing with large files in chunks, something that would make the code a lot more complex.

So I think the answer is "tough, if you want files >4G get a 64-bit machine". Which is unreasonable for a file system to say, but I think is fine for git.

-Peff
Previous: Andreas EricssonNext: Pau Garcia i Quiles
Message 13 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.