< prev index next >

src/hotspot/share/gc/shared/collectedHeap.cpp

Print this page

        

*** 171,180 **** --- 171,192 ---- bool CollectedHeap::request_concurrent_phase(const char* phase) { return false; } + bool CollectedHeap::is_oop_location(void* addr) const { + if (!is_object_aligned(addr)) { + return false; + } + + if (!_reserved.contains(addr)) { + return false; + } + + return true; + } + bool CollectedHeap::is_oop(oop object) const { if (!is_object_aligned(object)) { return false; }
*** 341,355 **** } } } #endif // PRODUCT - void CollectedHeap::check_oop_location(void* addr) const { - assert(is_object_aligned(addr), "address is not aligned"); - assert(_reserved.contains(addr), "address is not in reserved heap"); - } - size_t CollectedHeap::max_tlab_size() const { // TLABs can't be bigger than we can fill with a int[Integer.MAX_VALUE]. // This restriction could be removed by enabling filling with multiple arrays. // If we compute that the reasonable way as // header_size + ((sizeof(jint) * max_jint) / HeapWordSize) --- 353,362 ----
*** 374,385 **** #ifdef ASSERT void CollectedHeap::fill_args_check(HeapWord* start, size_t words) { assert(words >= min_fill_size(), "too small to fill"); assert(is_object_aligned(words), "unaligned size"); ! DEBUG_ONLY(Universe::heap()->check_oop_location(start);) ! DEBUG_ONLY(Universe::heap()->check_oop_location(start + words - MinObjAlignment);) } void CollectedHeap::zap_filler_array(HeapWord* start, size_t words, bool zap) { if (ZapFillerObjects && zap) { --- 381,392 ---- #ifdef ASSERT void CollectedHeap::fill_args_check(HeapWord* start, size_t words) { assert(words >= min_fill_size(), "too small to fill"); assert(is_object_aligned(words), "unaligned size"); ! assert(Universe::heap()->is_oop_location(start), "invalid address"); ! assert(Universe::heap()->is_oop_location(start + words - MinObjAlignment), "invalid address"); } void CollectedHeap::zap_filler_array(HeapWord* start, size_t words, bool zap) { if (ZapFillerObjects && zap) {
< prev index next >