void G1DefaultAllocator::release_gc_alloc_regions(EvacuationInfo& evacuation_info) { AllocationContext_t context = AllocationContext::current(); evacuation_info.set_allocation_regions(survivor_gc_alloc_region(context)->count() + old_gc_alloc_region(context)->count()); survivor_gc_alloc_region(context)->release(); // If we have an old GC alloc region to release, we'll save it in // _retained_old_gc_alloc_region. If we don't // _retained_old_gc_alloc_region will become NULL. This is what we // want either way so no reason to check explicitly for either // condition. _retained_old_gc_alloc_region = old_gc_alloc_region(context)->release(); if (_retained_old_gc_alloc_region != NULL) { _retained_old_gc_alloc_region->record_retained_region(); } }
void G1DefaultAllocator::release_gc_alloc_regions(uint no_of_gc_workers, EvacuationInfo& evacuation_info) { AllocationContext_t context = AllocationContext::current(); evacuation_info.set_allocation_regions(survivor_gc_alloc_region(context)->count() + old_gc_alloc_region(context)->count()); survivor_gc_alloc_region(context)->release(); // If we have an old GC alloc region to release, we'll save it in // _retained_old_gc_alloc_region. If we don't // _retained_old_gc_alloc_region will become NULL. This is what we // want either way so no reason to check explicitly for either // condition. _retained_old_gc_alloc_region = old_gc_alloc_region(context)->release(); if (ResizePLAB) { _g1h->_survivor_plab_stats.adjust_desired_plab_sz(no_of_gc_workers); _g1h->_old_plab_stats.adjust_desired_plab_sz(no_of_gc_workers); } }
void G1DefaultAllocator::release_gc_alloc_regions(EvacuationInfo& evacuation_info) { AllocationContext_t context = AllocationContext::current(); evacuation_info.set_allocation_regions(survivor_gc_alloc_region(context)->count() + old_gc_alloc_region(context)->count()); survivor_gc_alloc_region(context)->release(); // If we have an old GC alloc region to release, we'll save it in // _retained_old_gc_alloc_region. If we don't // _retained_old_gc_alloc_region will become NULL. This is what we // want either way so no reason to check explicitly for either // condition. _retained_old_gc_alloc_region = old_gc_alloc_region(context)->release(); if (_retained_old_gc_alloc_region != NULL) { _retained_old_gc_alloc_region->record_retained_region(); } if (ResizePLAB) { _g1h->alloc_buffer_stats(InCSetState::Young)->adjust_desired_plab_sz(); _g1h->alloc_buffer_stats(InCSetState::Old)->adjust_desired_plab_sz(); } }