Detecting Garbage Collector Generation

Volkan Hatem volkan at
Sun Mar 28 21:04:46 UTC 2010

Apologies in advance if this list is not intended for these kind of

JDK 1.6:

How can I detect to which generation an object belongs? (regular java,

Is it safe to assume that all generations are allocated contigiously? Hence
detecting starting offset & size of a generation may give me what I'm
looking for?

Where can I find more information about how GC interacts with JVM? In other
words, how can I implement agents which interacts with GC the way JVMTI

This will require more than detecting start/stop of GC collection. What GC
had detected as reachable/unreachable, decision to promote an object etc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the hotspot-gc-dev mailing list