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

Re: garbage collection



>I'm having a problem with some window functions that causes Lisp to start
>garbage collection and continue until Lisp unexpectedly quits.  I have a
>display window and a set of offscreen pixmaps with functions for moving images
>back and forth between them.  I also have some functions for changing the
>color look up tables.  Each of the offscreen pixmaps share a common color
>table which is the one that is used to update the device color table.  I have
>a function that allows me to compute and install various gradients of grey
>scale.  This uses SetEntries to change the color table and works fine.  When
>I try to use a different color table and do a SetEntries the garbage
collection
>starts.  Also, when I move values from another color table to the
shared
>color table and do a SetEntries the garbage collection also starts.  This
>does not occur when I have no offscreen pixmaps.  Any ideas?  What can cause
>this type of garbage collection behavior?
>
>Allen

I've had similar problems in MCL 2.0 alpha versions when I used many picts.
I found that the default min and max heap sizes were set too low so that when
I called functions that caused the heap to fill up, lisp's garbage collection
was
triggered (which didn't help very much).  Then the function that triggered
the GC is restarted by lisp.  This results in another GC and voila ... a loop.
I corrected the problem by using resedit on the MCL 2.0 application itself.
Edit the LSIZ resource (there's only one) and change both the "Initial Mac
Heap Min Size" and the "Initial Mac Heap Max Size".  In my case I found
that I needed to quadruple them to 102400 and 409600 respectively.
Hope this helps.    Paul Krueger (plkrueger@3m.com)

P.S. I'd be interested in seeing your pixmap code if you would like to share
it.