Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
8244714: G1 young gen sizer allows zero young gen with huge -XX:NewRatio
Browse files Browse the repository at this point in the history
Reviewed-by: sjohanss
  • Loading branch information
Thomas Schatzl committed May 13, 2020
1 parent 7345502 commit 0dab181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1YoungGenSizer.cpp
Expand Up @@ -102,7 +102,7 @@ void G1YoungGenSizer::recalculate_min_max_young_length(uint number_of_heap_regio
// Do nothing. Values set on the command line, don't update them at runtime.
break;
case SizerNewRatio:
*min_young_length = number_of_heap_regions / (NewRatio + 1);
*min_young_length = MAX2((uint)(number_of_heap_regions / (NewRatio + 1)), 1u);
*max_young_length = *min_young_length;
break;
default:
Expand Down

0 comments on commit 0dab181

Please sign in to comment.