< prev index next >

src/share/vm/gc/g1/heapRegionManager.hpp

Print this page




 133                     _free_list("Free list", new MasterFreeRegionListMtSafeChecker())
 134   { }
 135 
 136   void initialize(G1RegionToSpaceMapper* heap_storage,
 137                   G1RegionToSpaceMapper* prev_bitmap,
 138                   G1RegionToSpaceMapper* next_bitmap,
 139                   G1RegionToSpaceMapper* bot,
 140                   G1RegionToSpaceMapper* cardtable,
 141                   G1RegionToSpaceMapper* card_counts);
 142 
 143   // Return the "dummy" region used for G1AllocRegion. This is currently a hardwired
 144   // new HeapRegion that owns HeapRegion at index 0. Since at the moment we commit
 145   // the heap from the lowest address, this region (and its associated data
 146   // structures) are available and we do not need to check further.
 147   HeapRegion* get_dummy_region() { return new_heap_region(0); }
 148 
 149   // Return the HeapRegion at the given index. Assume that the index
 150   // is valid.
 151   inline HeapRegion* at(uint index) const;
 152 
 153   // Return the next region (by index) if that region is also humongous, NULL otherwise.
 154   inline HeapRegion* next_humongous_region(HeapRegion* hr) const;

 155 
 156   // If addr is within the committed space return its corresponding
 157   // HeapRegion, otherwise return NULL.
 158   inline HeapRegion* addr_to_region(HeapWord* addr) const;
 159 
 160   // Insert the given region into the free region list.
 161   inline void insert_into_free_list(HeapRegion* hr);
 162 
 163   // Insert the given region list into the global free region list.
 164   void insert_list_into_free_list(FreeRegionList* list) {
 165     _free_list.add_ordered(list);
 166   }
 167 
 168   HeapRegion* allocate_free_region(bool is_old) {
 169     HeapRegion* hr = _free_list.remove_region(is_old);
 170 
 171     if (hr != NULL) {
 172       assert(hr->next() == NULL, "Single region should not have next");
 173       assert(is_available(hr->hrm_index()), "Must be committed");
 174     }




 133                     _free_list("Free list", new MasterFreeRegionListMtSafeChecker())
 134   { }
 135 
 136   void initialize(G1RegionToSpaceMapper* heap_storage,
 137                   G1RegionToSpaceMapper* prev_bitmap,
 138                   G1RegionToSpaceMapper* next_bitmap,
 139                   G1RegionToSpaceMapper* bot,
 140                   G1RegionToSpaceMapper* cardtable,
 141                   G1RegionToSpaceMapper* card_counts);
 142 
 143   // Return the "dummy" region used for G1AllocRegion. This is currently a hardwired
 144   // new HeapRegion that owns HeapRegion at index 0. Since at the moment we commit
 145   // the heap from the lowest address, this region (and its associated data
 146   // structures) are available and we do not need to check further.
 147   HeapRegion* get_dummy_region() { return new_heap_region(0); }
 148 
 149   // Return the HeapRegion at the given index. Assume that the index
 150   // is valid.
 151   inline HeapRegion* at(uint index) const;
 152 
 153   // Return the next region (by index) that is part of the same
 154   // humongous object that hr is part of.
 155   inline HeapRegion* next_region_in_humongous(HeapRegion* hr) const;
 156 
 157   // If addr is within the committed space return its corresponding
 158   // HeapRegion, otherwise return NULL.
 159   inline HeapRegion* addr_to_region(HeapWord* addr) const;
 160 
 161   // Insert the given region into the free region list.
 162   inline void insert_into_free_list(HeapRegion* hr);
 163 
 164   // Insert the given region list into the global free region list.
 165   void insert_list_into_free_list(FreeRegionList* list) {
 166     _free_list.add_ordered(list);
 167   }
 168 
 169   HeapRegion* allocate_free_region(bool is_old) {
 170     HeapRegion* hr = _free_list.remove_region(is_old);
 171 
 172     if (hr != NULL) {
 173       assert(hr->next() == NULL, "Single region should not have next");
 174       assert(is_available(hr->hrm_index()), "Must be committed");
 175     }


< prev index next >