File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -1400,16 +1400,9 @@ uint G1Policy::calc_max_old_cset_length() const {
14001400 // as a percentage of the heap size. I.e., it should bound the
14011401 // number of old regions added to the CSet irrespective of how many
14021402 // of them are available.
1403-
1404- const G1CollectedHeap* g1h = G1CollectedHeap::heap ();
1405- const size_t region_num = g1h->num_regions ();
1406- const size_t perc = (size_t ) G1OldCSetRegionThresholdPercent;
1407- size_t result = region_num * perc / 100 ;
1408- // emulate ceiling
1409- if (100 * result < region_num * perc) {
1410- result += 1 ;
1411- }
1412- return (uint) result;
1403+ double result = (double )_g1h->num_regions () * G1OldCSetRegionThresholdPercent / 100 ;
1404+ // Round up to be conservative.
1405+ return (uint)ceil (result);
14131406}
14141407
14151408void G1Policy::calculate_old_collection_set_regions (G1CollectionSetCandidates* candidates,
You can’t perform that action at this time.
0 commit comments