[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Heap-expansion problem



When I run programs that allocate a lot of memory,
I sometimes get an unreasonbly large heap expansion factor,
like this:

USER(1): ;; commands to load and start program

gc: E=81% N=3262536 O+=176 pfu=130+1689 pfg=0+119
gc: XN-E=35% N=13638880 O+=0 pfu=0+56 pfg=0+1896
gc: E=58% N=12750088 O+=104 pfu=0+1084 pfg=28+8061
gc: E=12% N=44423520 O+=0 pfu=50+2158 pfg=171+19088
Error: An explicit gc call caused a need for 42729472 more bytes of heap.
This would exceed the image size limit set at initial build.
  [condition type: storage-condition]

My guess is that the memory requirement grew so fast that there wasn't
time for objects to be tenured.  Though I have no idea how the new space
got from the initial 8M to more than 44M in one expansion.

What's the best way to deal with this problem?
(The program does finish if I explicitly call gc periodically.)

Also, is there a way to get at the numbers printed by (room)?
If so, then I can call gc explicitly at places where the fewest
objects are likely to survive and when free space is low.