8152160: SIGFPE in CompactibleFreeListSpaceLAB::compute_desired_plab_size
authorsangheki
Thu, 24 Mar 2016 23:07:06 -0700
changeset 37194 96cc74bd293b
parent 37193 c42522f25d53
child 37195 88b6f1271f64
8152160: SIGFPE in CompactibleFreeListSpaceLAB::compute_desired_plab_size Summary: Rephrase the calculation with CMSOldPLABNumRefills to avoid an overflow Reviewed-by: pliden, jmasa
hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp
--- a/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Fri Mar 25 03:53:18 2016 +0000
+++ b/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp	Thu Mar 24 23:07:06 2016 -0700
@@ -2536,7 +2536,7 @@
         _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;