8139867: Change how startsHumongous and continuesHumongous regions work in G1

Reviewed-by: tschatzl, tbenson
This commit is contained in:
David Lindholm 2015-11-09 09:19:39 +01:00
parent fbac3a147e
commit 6bda88594d
26 changed files with 192 additions and 463 deletions

View file

@ -47,6 +47,18 @@ inline HeapRegion* HeapRegionManager::at(uint index) const {
return hr;
}
inline HeapRegion* HeapRegionManager::next_region_in_humongous(HeapRegion* hr) const {
uint index = hr->hrm_index();
assert(is_available(index), "pre-condition");
assert(hr->is_humongous(), "next_region_in_humongous should only be called for a humongous region.");
index++;
if (index < max_length() && is_available(index) && at(index)->is_continues_humongous()) {
return at(index);
} else {
return NULL;
}
}
inline void HeapRegionManager::insert_into_free_list(HeapRegion* hr) {
_free_list.add_ordered(hr);
}