# HG changeset patch # User jprovino # Date 1450195260 0 # Node ID 7afedbda9c36020f48ad4ccde0f4afdc1c6d366a # Parent 45801556e636ea69a857fe4d33a036549a20671c# Parent e75913632d00df4222fc4362201aecfb07e6580d Merge diff -r 45801556e636 -r 7afedbda9c36 hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp --- a/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp Thu Dec 10 20:14:00 2015 +0300 +++ b/hotspot/src/share/vm/gc/cms/compactibleFreeListSpace.cpp Tue Dec 15 16:01:00 2015 +0000 @@ -2511,7 +2511,11 @@ // Lacking sufficient experience, CMSOldPLABResizeQuicker is disabled by // default. if (ResizeOldPLAB && CMSOldPLABResizeQuicker) { - size_t multiple = _num_blocks[word_sz]/(CMSOldPLABToleranceFactor*CMSOldPLABNumRefills*n_blks); + // + // On a 32-bit VM, the denominator can become zero because of integer overflow, + // which is why there is a cast to double. + // + size_t multiple = (size_t) (_num_blocks[word_sz]/(((double)CMSOldPLABToleranceFactor)*CMSOldPLABNumRefills*n_blks)); n_blks += CMSOldPLABReactivityFactor*multiple*n_blks; n_blks = MIN2(n_blks, CMSOldPLABMax); }