GC and CDS
johannes.rudolph at googlemail.com
Fri Jul 30 09:47:44 PDT 2010
I'm just browsing the OpenJDK sources and try to understand how the
class data sharing mechanism works in detail. I've already quite
learned a bit but what I still don't understand is how CDS works
together with garbage collection.
Is my understanding correct: When a full GC is done class metadata
(and other PermGen stuff) is subject to gc as with other things in the
heap. As far as I understood shared classes are mapped into the memory
space of the JVM process read only logically as a part of the PermGen
and should not be changed afterwards. How is it accomplished that the
GC doesn't touch this space? I've still not found the code which skips
over objects in the CDS PermGen in contrast to the normal PermGen.
More information about the hotspot-gc-dev