[Gc] Re: Understanding why GC'ing increases to the double in time?

Hans Boehm Hans.Boehm at hp.com
Mon Feb 13 20:11:11 PST 2006



On Mon, 13 Feb 2006, Martin Egholm Nielsen wrote:

> > [Hans:]
> > An alternative is to just start over and drop the previous marking work
> > when the client code needs cycles.  That's also already supported, but
> > only works if the client resularly has enough idle time to allow the GC
> > to complete.
> Now, that sounds like an idea - but how do you interrupt when it's
> going, and the (Java/application-) world is stopped?
> This is really beginning to sound interesting to me, because my
> interruptions are caused by external "interrupts"...
>
At the GC level, you call GC_try_to_collect with a callback function,
which is invoked periodically (probably order of every few msecs under
normal circumstances) to see whether the collection should be aborted.

Exporting this cleanly to the Java level is probably nontrivial,
especially since the callback is rather restricted in what it can do.
(This should be better documented.)

Hans


More information about the Gc mailing list