< prev index next > src/hotspot/share/oops/objArrayKlass.cpp
Print this page
assert(is_array_klass(), "sanity");
assert(is_objArray_klass(), "sanity");
}
size_t ObjArrayKlass::oop_size(oop obj) const {
- assert(obj->is_objArray(), "must be object array");
+ // In this assert, we cannot safely access the Klass* with compact headers.
+ assert(UseCompactObjectHeaders || obj->is_objArray(), "must be object array");
return objArrayOop(obj)->object_size();
}
objArrayOop ObjArrayKlass::allocate(int length, TRAPS) {
check_array_allocation_length(length, arrayOopDesc::max_array_length(T_OBJECT), CHECK_NULL);
< prev index next >