< prev index next >
src/share/vm/gc/g1/heapRegion.inline.hpp
Print this page
@@ -116,10 +116,16 @@
HeapRegion::block_is_obj(const HeapWord* p) const {
G1CollectedHeap* g1h = G1CollectedHeap::heap();
if (!this->is_in(p)) {
HeapRegion* hr = g1h->heap_region_containing(p);
+#ifdef ASSERT
+ assert(hr->is_humongous(), "This case can only happen for humongous regions");
+ oop obj = oop(hr->humongous_start_region()->bottom());
+ assert((HeapWord*)obj <= p, "p must be in humongous object");
+ assert(p <= (HeapWord*)obj + obj->size(), "p must be in humongous object");
+#endif
return hr->block_is_obj(p);
}
if (ClassUnloadingWithConcurrentMark) {
return !g1h->is_obj_dead(oop(p), this);
}
< prev index next >