8152160: SIGFPE in CompactibleFreeListSpaceLAB::compute_desired_plab_size

Rephrase the calculation with CMSOldPLABNumRefills to avoid an overflow

Reviewed-by: pliden, jmasa
This commit is contained in:
Sangheon Kim 2016-03-24 23:07:06 -07:00
parent d7e8dc2fef
commit d676c6233e

View File

@ -2536,7 +2536,7 @@ void CompactibleFreeListSpaceLAB::compute_desired_plab_size() {
_blocks_to_claim[i].sample(
MAX2(CMSOldPLABMin,
MIN2(CMSOldPLABMax,
_global_num_blocks[i]/(_global_num_workers[i]*CMSOldPLABNumRefills))));
_global_num_blocks[i]/_global_num_workers[i]/CMSOldPLABNumRefills)));
}
// Reset counters for next round
_global_num_workers[i] = 0;