From: Shawn O. Pearce Date: Thu, 08 Jan 2009 15:34:10 GMT Subject: Re: [PATCH] Wrap inflateInit to retry allocation after releasing pack memory Message-ID: <20090108153410.GB16840@spearce.org> In-Reply-To: Linus Torvalds 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.