164 }
165
166 void verify_list();
167
168 #ifdef ASSERT
169 bool contains(HeapRegion* hr) const {
170 return hr->containing_set() == this;
171 }
172 #endif
173
174 static void set_unrealistically_long_length(uint len);
175
176 // Add hr to the list. The region should not be a member of another set.
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
|
164 }
165
166 void verify_list();
167
168 #ifdef ASSERT
169 bool contains(HeapRegion* hr) const {
170 return hr->containing_set() == this;
171 }
172 #endif
173
174 static void set_unrealistically_long_length(uint len);
175
176 // Add hr to the list. The region should not be a member of another set.
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 HeapRegion* remove_region_with_node_index(bool from_head,
185 const uint requested_node_index,
186 uint* region_node_index);
187
188 // Merge two ordered lists. The result is also ordered. The order is
189 // determined by hrm_index.
190 void add_ordered(FreeRegionList* from_list);
191
192 // It empties the list by removing all regions from it.
193 void remove_all();
194
195 // Remove all (contiguous) regions from first to first + num_regions -1 from
196 // this list.
197 // Num_regions must be > 1.
198 void remove_starting_at(HeapRegion* first, uint num_regions);
199
200 virtual void verify();
201
202 uint num_of_regions_in_range(uint start, uint end) const;
203 };
204
205 // Iterator class that provides a convenient way to iterate over the
206 // regions of a FreeRegionList.
207
|