< prev index next >

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

Print this page




 155   inline HeapRegion* at(uint index) const;
 156 
 157   // Return the HeapRegion at the given index, NULL if the index
 158   // is for an unavailable region.
 159   inline HeapRegion* at_or_null(uint index) const;
 160 
 161   // Returns whether the given region is available for allocation.
 162   bool is_available(uint region) const;
 163 
 164   // Return the next region (by index) that is part of the same
 165   // humongous object that hr is part of.
 166   inline HeapRegion* next_region_in_humongous(HeapRegion* hr) const;
 167 
 168   // If addr is within the committed space return its corresponding
 169   // HeapRegion, otherwise return NULL.
 170   inline HeapRegion* addr_to_region(HeapWord* addr) const;
 171 
 172   // Insert the given region into the free region list.
 173   inline void insert_into_free_list(HeapRegion* hr);
 174 






 175   // Insert the given region list into the global free region list.
 176   void insert_list_into_free_list(FreeRegionList* list) {
 177     _free_list.add_ordered(list);





 178   }
 179 
 180   // Allocate a free region with specific node index. If fails allocate with next node index.
 181   virtual HeapRegion* allocate_free_region(HeapRegionType type, uint requested_node_index);
 182 
 183   inline void allocate_free_regions_starting_at(uint first, uint num_regions);
 184 
 185   // Remove all regions from the free list.
 186   void remove_all_free_regions() {
 187     _free_list.remove_all();
 188   }
 189 
 190   // Return the number of committed free regions in the heap.
 191   uint num_free_regions() const {
 192     return _free_list.length();
 193   }
 194 
 195   uint num_free_regions(uint node_index) const {
 196     return _free_list.length(node_index);
 197   }




 155   inline HeapRegion* at(uint index) const;
 156 
 157   // Return the HeapRegion at the given index, NULL if the index
 158   // is for an unavailable region.
 159   inline HeapRegion* at_or_null(uint index) const;
 160 
 161   // Returns whether the given region is available for allocation.
 162   bool is_available(uint region) const;
 163 
 164   // Return the next region (by index) that is part of the same
 165   // humongous object that hr is part of.
 166   inline HeapRegion* next_region_in_humongous(HeapRegion* hr) const;
 167 
 168   // If addr is within the committed space return its corresponding
 169   // HeapRegion, otherwise return NULL.
 170   inline HeapRegion* addr_to_region(HeapWord* addr) const;
 171 
 172   // Insert the given region into the free region list.
 173   inline void insert_into_free_list(HeapRegion* hr);
 174 
 175   // Abandon the current free list to allow for a rebuild. The actual
 176   // region in the free list must be handled separately.
 177   void abandon_free_list() {
 178     _free_list.abandon();
 179   }
 180 
 181   // Insert the given region list into the global free region list.
 182   void insert_list_into_free_list(FreeRegionList* list) {
 183     _free_list.add_ordered(list);
 184   }
 185 
 186   // Append the list to the current list, requires the lists to be sorted.
 187   void append_to_free_list(FreeRegionList* list) {
 188     _free_list.append_ordered(list);
 189   }
 190 
 191   // Allocate a free region with specific node index. If fails allocate with next node index.
 192   virtual HeapRegion* allocate_free_region(HeapRegionType type, uint requested_node_index);
 193 
 194   inline void allocate_free_regions_starting_at(uint first, uint num_regions);
 195 
 196   // Remove all regions from the free list.
 197   void remove_all_free_regions() {
 198     _free_list.remove_all();
 199   }
 200 
 201   // Return the number of committed free regions in the heap.
 202   uint num_free_regions() const {
 203     return _free_list.length();
 204   }
 205 
 206   uint num_free_regions(uint node_index) const {
 207     return _free_list.length(node_index);
 208   }


< prev index next >