Closed Bug 644004 Opened 13 years ago Closed 13 years ago

"out of memory" due to GC, despite lots of physical memory left

Categories

(Core :: JavaScript Engine, defect)

Other Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: azakai, Unassigned)

References

Details

The attached archive contains emscripten and a very large input file for it (poppler+freetype), which when run as follows

  js compiler.js < src.cpp.o.ll

will run for a while, reach approx 600MB of virtual and resident memory, then exit with "out of memory". This is triggered due to

  delayedOutOfMemory = (rt->gcBytes > rt->gcMaxBytes)

in jscntxt.cpp. gcMaxBytes is 160MB, and gcBytes reaches it.

There is, however, over 2GB of free physical memory on this machine.

v8 runs the script successfully, reaching a maximum of about 400MB.
Attachment was too big for bugzilla. Here it is:

http://syntensity.com/static/src.tar.bz2
Can you try this at the top of the script?
  gcparam('maxBytes', 1024*1024*1024);

For some reason, gcMaxBytes is set to be pretty low in the shell. It's much higher in the browser.
Blocks: 644244
Thanks, that fixes it.

Is it feasible to make it so we can allocate any amount of memory for GC (while there is system memory)?
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.