cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Waddington <Si...@ZapNetworks.com>
Subject RE: Memory Store and JDK 1.2
Date Wed, 01 Mar 2000 02:51:44 GMT
Indeed there are, its the green/yellow/red zone notification feature of
sun.misc.VM package.  This allows you to register to receive a notification
event when memory is getting low.  However they are JVM specific and using
them is a very bad idea unless you are implementing code for Sun.  Their web
browsing code frequently uses it to manage cache space so someone at Sun
obviously thought it was a good way to do the cache.  They also used a
daemon thread to monitor free heap space and schedule cleanup - however in a
resource starved system that isn't very reliable.  They also had an internal
method of doing weak refs in 1.1 (sun.misc.Ref)

> BUT, as far as I know, there are ways to hook into the JVM's GC and/or
heap manager to be notified of GC events and low memory conditions. I don't
know at this time if it is documented, but the RMI subsystem uses it even in
JDK 1.1.

Mime
View raw message