< prev index next > src/hotspot/share/gc/parallel/psOldGen.cpp
Print this page
public:
VerifyObjectStartArrayClosure(ObjectStartArray* start_array) :
_start_array(start_array) { }
virtual void do_object(oop obj) {
! HeapWord* test_addr = cast_from_oop<HeapWord*>(obj) + 1;
guarantee(_start_array->object_start(test_addr) == cast_from_oop<HeapWord*>(obj), "ObjectStartArray cannot find start of object");
guarantee(_start_array->is_block_allocated(cast_from_oop<HeapWord*>(obj)), "ObjectStartArray missing block allocation");
}
};
public:
VerifyObjectStartArrayClosure(ObjectStartArray* start_array) :
_start_array(start_array) { }
virtual void do_object(oop obj) {
! // With compact headers, the objects can be one-word sized.
+ size_t int_off = UseCompactObjectHeaders ? MIN2((size_t)1, obj->size() - 1) : 1;
+ HeapWord* test_addr = cast_from_oop<HeapWord*>(obj) + int_off;
guarantee(_start_array->object_start(test_addr) == cast_from_oop<HeapWord*>(obj), "ObjectStartArray cannot find start of object");
guarantee(_start_array->is_block_allocated(cast_from_oop<HeapWord*>(obj)), "ObjectStartArray missing block allocation");
}
};
< prev index next >