< prev index next >
src/hotspot/share/oops/instanceMirrorKlass.cpp
Print this page
*** 50,60 ****
int size = instance_size(k);
assert(size > 0, "total object size must be positive: %d", size);
// Since mirrors can be variable sized because of the static fields, store
// the size in the mirror itself.
! return (instanceOop)Universe::heap()->class_allocate(this, size, CHECK_NULL);
}
int InstanceMirrorKlass::oop_size(oop obj) const {
return java_lang_Class::oop_size_raw(obj);
}
--- 50,61 ----
int size = instance_size(k);
assert(size > 0, "total object size must be positive: %d", size);
// Since mirrors can be variable sized because of the static fields, store
// the size in the mirror itself.
! instanceOop i = (instanceOop)Universe::heap()->class_allocate(this, size, CHECK_NULL);
! return i;
}
int InstanceMirrorKlass::oop_size(oop obj) const {
return java_lang_Class::oop_size_raw(obj);
}
< prev index next >