[haiku-development] Re: Out of memory errors when virtual memory disabled

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 5 Dec 2011 08:29:37 -0500

On Mon, Dec 5, 2011 at 8:25 AM, Rimas Kudelis <rq@xxxxxx> wrote:
> Although it's hard to believe that builtin Haiku applications alone would
> end up reserving the whole 1.5 gigabyte. They definately never use that...

Bear in mind the way that e.g. the Haiku build process works is that
jam forks itself and then exec's gcc or whatever else it plans to
invoke. Ergo, at the point of forking you have 2 identical jam
processes up until the exec, both of which need 500-700MB reserved. It
happens very briefly since the exec call immediately follows, but the
OS can't know that, so that amount's immediately reserved, and
probably fails. As a result, trying to build Haiku requires quite a
bit more RAM than you might expect. When swap is enabled, the VM
allows overcommits since in the worst case it can page things out one
page at a time (extremely slow but it's at least doable, even with
just 1MB).

Regards,

Rene

Other related posts: