Re: [PATCH] Wrap inflateInit to retry allocation after releasing pack memory
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jan 8, 2009, 15:34 UTC
- Message-ID
- <20090108153410.GB16840@spearce.org>
- In-Reply-To
- <alpine.LFD.2.00.0901071941210.3283@localhost.localdomain>
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> Let's do this (more complete) wrapping instead, ok?
Ack.
> This one _just_ wraps things, btw - it doesn't do the "retry on low memory > error" part, at least not yet. I think that's an independent issue from > the reporting.
I still think we should try to reduce pack memory usage when we get oom from zlib and retry the current operation once. We do it almost everywhere else and it works relatively well.
We may also want to consider dropping (e.g. halving) the window size and/or limit when we run out of memory. We'll run slower but if the OS has denied us further resources it may be a ulimit thing on a shared system, and we should try harder to work with what we have available to us.
-- Shawn.