[Newbies] Can I get a notification before fullGC?

Yoshiki Ohshima yoshiki at squeakland.org
Thu Oct 12 01:59:26 UTC 2006


  Hello,

  Is there any way to get some sort of notification right *before* a
fullGC happens so that some guys release their cache?

  Is there something I can do for this?  Thank you so much!

  Below is a little background...

  I noticed that the caching behavior of TTCFont is *still* relying on
the old (and broken) behavior of weak references.  Back then, when a
WeakArray is in the old space and the referent is in the young space,
the referent didn't get reclaimed until a fullGC.  This behavior was
quite nice; it releases the cache only when a big memory clean up is
required.  However, on recent VMs, the cache is released always go
away because the reference from the weak array is the only reference
to it.

  Andreas already had a fix for it:
http://impara.de/pipermail/tweak/2005-August/000881.html and I folded
it to the eToys image (which should go into other images), and it
seems to be working as expected.  However, a little thing (which is
not critical as his patch limits the upper limit of cache entries) is
that the cache is kept even when a fullGC happens.

-- Yoshiki


More information about the Beginners mailing list