src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

changeset 3335
3c648b9ad052
parent 3296
dc467e8b2c5e
child 3336
fd2b426c30db
equal deleted inserted replaced
3328:6d7d0790074d 3335:3c648b9ad052
2409 } 2409 }
2410 } 2410 }
2411 } 2411 }
2412 2412
2413 bool G1CollectedHeap::is_in(const void* p) const { 2413 bool G1CollectedHeap::is_in(const void* p) const {
2414 HeapRegion* hr = _hrs.addr_to_region((HeapWord*) p); 2414 if (_g1_committed.contains(p)) {
2415 if (hr != NULL) { 2415 // Given that we know that p is in the committed space,
2416 // heap_region_containing_raw() should successfully
2417 // return the containing region.
2418 HeapRegion* hr = heap_region_containing_raw(p);
2416 return hr->is_in(p); 2419 return hr->is_in(p);
2417 } else { 2420 } else {
2418 return _perm_gen->as_gen()->is_in(p); 2421 return _perm_gen->as_gen()->is_in(p);
2419 } 2422 }
2420 } 2423 }

mercurial