< prev index next >

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

Print this page
rev 51649 : version 1
rev 51878 : Minor changes
rev 52017 : All changes for G1 GC moved from 'combined' repo folder


 177   // Assumes that the list is ordered and will preserve that order. The order
 178   // is determined by hrm_index.
 179   inline void add_ordered(HeapRegion* hr);
 180 
 181   // Removes from head or tail based on the given argument.
 182   HeapRegion* remove_region(bool from_head);
 183 
 184   // Merge two ordered lists. The result is also ordered. The order is
 185   // determined by hrm_index.
 186   void add_ordered(FreeRegionList* from_list);
 187 
 188   // It empties the list by removing all regions from it.
 189   void remove_all();
 190 
 191   // Remove all (contiguous) regions from first to first + num_regions -1 from
 192   // this list.
 193   // Num_regions must be > 1.
 194   void remove_starting_at(HeapRegion* first, uint num_regions);
 195 
 196   virtual void verify();


 197 };
 198 
 199 // Iterator class that provides a convenient way to iterate over the
 200 // regions of a FreeRegionList.
 201 
 202 class FreeRegionListIterator : public StackObj {
 203 private:
 204   FreeRegionList* _list;
 205   HeapRegion*     _curr;
 206 
 207 public:
 208   bool more_available() {
 209     return _curr != NULL;
 210   }
 211 
 212   HeapRegion* get_next() {
 213     assert(more_available(),
 214            "get_next() should be called when more regions are available");
 215 
 216     // If we are going to introduce a count in the iterator we should


 177   // Assumes that the list is ordered and will preserve that order. The order
 178   // is determined by hrm_index.
 179   inline void add_ordered(HeapRegion* hr);
 180 
 181   // Removes from head or tail based on the given argument.
 182   HeapRegion* remove_region(bool from_head);
 183 
 184   // Merge two ordered lists. The result is also ordered. The order is
 185   // determined by hrm_index.
 186   void add_ordered(FreeRegionList* from_list);
 187 
 188   // It empties the list by removing all regions from it.
 189   void remove_all();
 190 
 191   // Remove all (contiguous) regions from first to first + num_regions -1 from
 192   // this list.
 193   // Num_regions must be > 1.
 194   void remove_starting_at(HeapRegion* first, uint num_regions);
 195 
 196   virtual void verify();
 197 
 198   uint num_of_regions_in_range(uint start, uint end) const;
 199 };
 200 
 201 // Iterator class that provides a convenient way to iterate over the
 202 // regions of a FreeRegionList.
 203 
 204 class FreeRegionListIterator : public StackObj {
 205 private:
 206   FreeRegionList* _list;
 207   HeapRegion*     _curr;
 208 
 209 public:
 210   bool more_available() {
 211     return _curr != NULL;
 212   }
 213 
 214   HeapRegion* get_next() {
 215     assert(more_available(),
 216            "get_next() should be called when more regions are available");
 217 
 218     // If we are going to introduce a count in the iterator we should
< prev index next >