equal
deleted
inserted
replaced
283 // The calculation is based on the number of marked regions we added |
283 // The calculation is based on the number of marked regions we added |
284 // to the CSet chooser in the first place, not how many remain, so |
284 // to the CSet chooser in the first place, not how many remain, so |
285 // that the result is the same during all mixed GCs that follow a cycle. |
285 // that the result is the same during all mixed GCs that follow a cycle. |
286 |
286 |
287 const size_t region_num = (size_t) _length; |
287 const size_t region_num = (size_t) _length; |
288 const size_t gc_num = (size_t) G1MaxMixedGCNum; |
288 const size_t gc_num = (size_t) G1MixedGCCountTarget; |
289 size_t result = region_num / gc_num; |
289 size_t result = region_num / gc_num; |
290 // emulate ceiling |
290 // emulate ceiling |
291 if (result * gc_num < region_num) { |
291 if (result * gc_num < region_num) { |
292 result += 1; |
292 result += 1; |
293 } |
293 } |