[issue577] memory error, even if half of the memory is free, and additional paging file is there

Johannes Stezenbach js at linuxtv.org
Tue Jun 5 16:02:31 CDT 2007


On Tue, Jun 05, 2007 at 12:54:51PM -0500, Matt Mackall wrote:
> On Tue, Jun 05, 2007 at 10:31:14AM -0700, Eric Hopper wrote:
> > On 6/3/07, THURNER rupert <mercurial-bugs at selenic.com> wrote:
> > >
> > >New submission from THURNER rupert <rupert.thurner at gmail.com>:
> > >
> > >on a intel pc with 2 gb of memory, 800 mb committed to programs, 1.2gbfree,
> > >we tried to add a 270mb binary file to a newly created repository. memory
> > >commit rises up to 1.1 gb or so, and then:
> > 
> > This is definitely a bug, and should probably be fixed.  But why are you
> > adding such a huge file?
> 
> It may be a bug, and it may be worth fixing. I suspect the above
> involves multiple allocations rounded up to the next highest power of
> two (512MB) by the C library.
> 
> But it's actually better that people run into the memory limitations
> on their initial commit of the file than on the second. They're also
> not going to be able to check that file out on a machine with 512MB of
> RAM, which may also be an unpleasant surprise.

hgwebdir.cgi limits will be even lower if you have RLimitMEM set to
something sane in apache httpd.conf.

It might be a good idea to have a setting in hgrc to limit
the file size, and have a safe and sane default. This would
also allow for a better error message, out-of-memory just looks
like a bug.


Johannes


More information about the Mercurial-devel mailing list