[gclist] GC triggering strategies
Charles Fiterman
cef@geode.geodesic.com
Tue, 19 Mar 1996 11:49:50 -0600
> > Anybody know of others?
>
> Well, you can give the user a procedure to call, which means "Now is a
> good time." Perhaps with a parameter saying *how* good. Seems like a
> better approach than totally automatic systems with fancy heuristics.
The best time to collect is when the mutator is idle and waiting.
We have a
gcAttemptCollection(gcIdleFunction funptr);
This is meant to be called when the calling program is waiting for
an event. If there was a reasonable amount of allocation since the
last collection a collection is started. It various points the
passed function is called. It should return a 1 if the calling
program has no work and a 1 if something like a key press or a
mouse click has happened. The caller determines what that is.
We find this usually completes in the real world.