src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp

Print this page
rev 4204 : 7163191: G1: introduce a "heap spanning table" abstraction
Summary: Add a heap spanning table and employ it for the heap region sequence table.
Reviewed-by:

@@ -35,11 +35,11 @@
 // Inline functions for G1CollectedHeap
 
 template <class T>
 inline HeapRegion*
 G1CollectedHeap::heap_region_containing(const T addr) const {
-  HeapRegion* hr = _hrs.addr_to_region((HeapWord*) addr);
+  HeapRegion* hr = _hrs.at((HeapWord*) addr);
   // hr can be null if addr in perm_gen
   if (hr != NULL && hr->continuesHumongous()) {
     hr = hr->humongous_start_region();
   }
   return hr;

@@ -47,16 +47,16 @@
 
 template <class T>
 inline HeapRegion*
 G1CollectedHeap::heap_region_containing_raw(const T addr) const {
   assert(_g1_reserved.contains((const void*) addr), "invariant");
-  HeapRegion* res = _hrs.addr_to_region_unsafe((HeapWord*) addr);
+  HeapRegion* res = _hrs.at_unsafe((HeapWord*) addr);
   return res;
 }
 
 inline bool G1CollectedHeap::obj_in_cs(oop obj) {
-  HeapRegion* r = _hrs.addr_to_region((HeapWord*) obj);
+  HeapRegion* r = _hrs.at((HeapWord*) obj);
   return r != NULL && r->in_collection_set();
 }
 
 inline HeapWord*
 G1CollectedHeap::attempt_allocation(size_t word_size,