7029458: G1: Add newly-reclaimed regions to the beginning of the region free list, not the end

What the synopsis says.

Reviewed-by: jwilhelm, iveresov, johnc
This commit is contained in:
Antonios Printezis 2011-03-29 22:36:16 -04:00
parent c2275649b7
commit 349d820dd1
5 changed files with 69 additions and 4 deletions

View file

@ -277,6 +277,10 @@ protected:
}
public:
// It adds hr to the list as the new head. The region should not be
// a member of another set.
inline void add_as_head(HeapRegion* hr);
// It adds hr to the list as the new tail. The region should not be
// a member of another set.
inline void add_as_tail(HeapRegion* hr);
@ -288,6 +292,11 @@ public:
// Convenience method.
inline HeapRegion* remove_head_or_null();
// It moves the regions from from_list to this list and empties
// from_list. The new regions will appear in the same order as they
// were in from_list and be linked in the beginning of this list.
void add_as_head(HeapRegionLinkedList* from_list);
// It moves the regions from from_list to this list and empties
// from_list. The new regions will appear in the same order as they
// were in from_list and be linked in the end of this list.