comparison src/share/vm/gc_implementation/g1/heapRegionSet.hpp @ 2432:455328d90876

7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end Summary: What the synopsis says. Reviewed-by: jwilhelm, iveresov, johnc
author tonyp
date Tue, 29 Mar 2011 22:36:16 -0400
parents 1216415d8e35
children fe189d4a44e9
comparison
equal deleted inserted replaced
2431:02f49b66361a 2432:455328d90876
275 HeapRegionLinkedList(const char* name) : HeapRegionSetBase(name) { 275 HeapRegionLinkedList(const char* name) : HeapRegionSetBase(name) {
276 clear(); 276 clear();
277 } 277 }
278 278
279 public: 279 public:
280 // It adds hr to the list as the new head. The region should not be
281 // a member of another set.
282 inline void add_as_head(HeapRegion* hr);
283
280 // It adds hr to the list as the new tail. The region should not be 284 // It adds hr to the list as the new tail. The region should not be
281 // a member of another set. 285 // a member of another set.
282 inline void add_as_tail(HeapRegion* hr); 286 inline void add_as_tail(HeapRegion* hr);
283 287
284 // It removes and returns the head of the list. It assumes that the 288 // It removes and returns the head of the list. It assumes that the
285 // list is not empty so it will return a non-NULL value. 289 // list is not empty so it will return a non-NULL value.
286 inline HeapRegion* remove_head(); 290 inline HeapRegion* remove_head();
287 291
288 // Convenience method. 292 // Convenience method.
289 inline HeapRegion* remove_head_or_null(); 293 inline HeapRegion* remove_head_or_null();
294
295 // It moves the regions from from_list to this list and empties
296 // from_list. The new regions will appear in the same order as they
297 // were in from_list and be linked in the beginning of this list.
298 void add_as_head(HeapRegionLinkedList* from_list);
290 299
291 // It moves the regions from from_list to this list and empties 300 // It moves the regions from from_list to this list and empties
292 // from_list. The new regions will appear in the same order as they 301 // from_list. The new regions will appear in the same order as they
293 // were in from_list and be linked in the end of this list. 302 // were in from_list and be linked in the end of this list.
294 void add_as_tail(HeapRegionLinkedList* from_list); 303 void add_as_tail(HeapRegionLinkedList* from_list);