Re: Confused over packfile and index design
- From
Shawn Pearce <spearce@spearce.org>
- Date
- Apr 9, 2011, 14:45 UTC
- Message-ID
- <BANLkTin8SXWC2cUqYvrPJrQWQKgMpRk4bg@mail.gmail.com>
- In-Reply-To
- <m28vvj7b0d.fsf@Spindle.sehlabs.com>
On Sat, Apr 9, 2011 at 10:30, Steven E. Harris <seh@panix.com> wrote:
Show 7 quoted lines
> Shawn Pearce <spearce@spearce.org> writes: >> Its meant to tell us how many bytes to malloc() in order to hold the >> result of the libz inflate() call when the object is being read from >> the packfile. That way we don't under or over allocate the result >> buffer. > > Does Git always inflate the objects into an in-memory buffer?
Yes.
> As the > size of these objects can be very large (given the variable-length size > encoding), is there any provision to inflate the object to a temporary > file?
Not currently. If you don't have enough memory for the malloc() buffer of a big object, Git dies with an out of memory error.
-- Shawn.