We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73c34be commit 7fd462fCopy full SHA for 7fd462f
src/hotspot/share/gc/z/zDirector.cpp
@@ -488,7 +488,8 @@ static bool rule_major_allocation_rate(const ZDirectorStats& stats) {
488
489
// Calculate the GC cost for each reclaimed byte
490
const double current_young_gc_time_per_bytes_freed = double(young_gc_time) / double(reclaimed_per_young_gc);
491
- const double current_old_gc_time_per_bytes_freed = double(old_gc_time) / double(reclaimed_per_old_gc);
+ const double current_old_gc_time_per_bytes_freed = reclaimed_per_old_gc == 0 ? std::numeric_limits<double>::infinity()
492
+ : (double(old_gc_time) / double(reclaimed_per_old_gc));
493
494
// Calculate extra time per young collection inflicted by *not* doing an
495
// old collection that frees up memory in the old generation.
0 commit comments