On Tue, Oct 21, 2008 at 4:16 PM, nicolas edel <nicolas.edel@...> wrote:
> running a lisp program using SBCL 1.0.17 on fedora 9 (i386/686 host), I am
> experiencing a gc error. Are there any know traps and pitfalls to avoid such
> errors ? Find below the produced error output:
Not a "gc error" as such: you are "just" running out of heap space.
When SBCL starts up, it reserves a block on contiguous memory aka "the
heap". If you end up requiring more storage than the heap can
accommodate, you run into trouble -- the GC reclaims parts of the heap
you don't need anymore so that they can be reused, but is not able to
grow it, unfortunately. Additionally, since the GC is copying, it
needs space to operate in. This means that you can run out of heap
during GC -- which is what you are seeing.
Some things to look at:
1. If your application just plain needs a lot space, run with a larger
head. See the --dynamic-space-size commandline option.
2. Make sure you are not holding on to garbage, for example in a
global hash-table or a list. If an object is accessible, the GC will
not be able to reclaim the space.
3. Consider representation efficiency: if you have for example a
massive array of booleans, consider using a bit-array instead: it will
take only 1/32th of the space on a 32bit platforms.
4. Consider using dynamic-extent where applicable.
5. Try running SBCL 220.127.116.11 or newer, where the collector is less conservative.
6. There *are* some patterns of allocation that are poison to the
conservative nature of GENCGC. If nothing else helps, try to reduce a
test case (10 lines or 1000 lines - doesn't matter so much, though of
course 10 lines is preferable!), and we can see about figuring it out,