Question about the mapping of oopDesc and KlassOop

Colin(Du Li) dawn2004 at gmail.com
Wed Feb 18 08:27:16 PST 2009


Thanks.
Then, every java class has only one klassOop object in the heap, or it can
have more one klassOop instance?

Du Li

Keith McGuigan wrote:
> 
> Colin(Du Li) wrote:
>> Hello,
>> 
>> I have a question about the java object layout in Hotspot.
>> In hotspot, a oopDesc respesents a java object, oopDesc contains a
>> pointer
>> to a klassOop instance. Is the relation  between the instance of oopDesc
>> and
>> the instance of klassOop one to one mapping ? Or multiple oopDesc 
>> instances
>> can share one klassOop?
>> Thanks a lot!
> 
> The latter.  An oopDesc* is a pointer to an object in the java heap. 
> Every oop in the heap has a pointer to it's type (the klassOop) as it's 
> second field.
> 
> --
> - Keith
> 
> 

-- 
View this message in context: http://www.nabble.com/Question-about-the-mapping-of-oopDesc-and-KlassOop-tp22081975p22082449.html
Sent from the OpenJDK Hotspot Virtual Machine mailing list archive at Nabble.com.




More information about the hotspot-dev mailing list