equal
deleted
inserted
replaced
91 // degenerate case the PLAB size would simply quickly tend to minimum PLAB size, |
91 // degenerate case the PLAB size would simply quickly tend to minimum PLAB size, |
92 // which is an okay reaction. |
92 // which is an okay reaction. |
93 size_t const used_for_waste_calculation = used() > _region_end_waste ? used() - _region_end_waste : 0; |
93 size_t const used_for_waste_calculation = used() > _region_end_waste ? used() - _region_end_waste : 0; |
94 |
94 |
95 size_t const total_waste_allowed = used_for_waste_calculation * TargetPLABWastePct; |
95 size_t const total_waste_allowed = used_for_waste_calculation * TargetPLABWastePct; |
96 size_t const cur_plab_sz = (double)total_waste_allowed / G1LastPLABAverageOccupancy; |
96 size_t const cur_plab_sz = (size_t)((double)total_waste_allowed / G1LastPLABAverageOccupancy); |
97 // Take historical weighted average |
97 // Take historical weighted average |
98 _filter.sample(cur_plab_sz); |
98 _filter.sample(cur_plab_sz); |
99 // Clip from above and below, and align to object boundary |
99 // Clip from above and below, and align to object boundary |
100 size_t plab_sz; |
100 size_t plab_sz; |
101 plab_sz = MAX2(min_size(), (size_t)_filter.average()); |
101 plab_sz = MAX2(min_size(), (size_t)_filter.average()); |