Question about the mapping of oopDesc and KlassOop

Keith McGuigan Keith.McGuigan at Sun.COM
Wed Feb 18 08:56:08 PST 2009


Colin(Du Li) wrote:
> Thanks.
> Then, every java class has only one klassOop object in the heap, or it can
> have more one klassOop instance?

There are a couple of data structures that correspond to a "java class", 
one of them is an instanceKlassOop, which is what the VM uses to hold 
most of the class information.  Another is the java-level mirror (which 
is a normal Java instance object (instanceOop), and what you get when 
you call getClass() or use X.class in Java).   But yes, there is only 
one instanceKlass and mirror object per "Java class".

--
- Keith



More information about the hotspot-dev mailing list