< prev index next > test/hotspot/gtest/oops/test_typeArrayOop.cpp
Print this page
memset(mem, 0, ARRAY_SIZE(mem));
char* addr = align_up(mem, 16);
typeArrayOop o = (typeArrayOop) cast_to_oop(addr);
! o->set_klass(Universe::boolArrayKlass());
o->set_length(10);
ASSERT_EQ((jboolean)0, o->bool_at(0));
ASSERT_EQ((jboolean)0, o->bool_at(1));
memset(mem, 0, ARRAY_SIZE(mem));
char* addr = align_up(mem, 16);
typeArrayOop o = (typeArrayOop) cast_to_oop(addr);
! if (UseCompactObjectHeaders) {
+ o->set_mark(Universe::boolArrayKlass()->prototype_header());
+ } else {
+ o->set_klass(Universe::boolArrayKlass());
+ }
o->set_length(10);
ASSERT_EQ((jboolean)0, o->bool_at(0));
ASSERT_EQ((jboolean)0, o->bool_at(1));
< prev index next >