8322279: Generational ZGC: Use ZFragmentationLimit and ZYoungCompactionLimit as percentage instead of multiples

Reviewed-by: eosterlund
This commit is contained in:
Guoxiong Li 2024-01-15 14:34:14 +00:00
parent c84c0ab52d
commit bf813be0f3

View File

@ -101,9 +101,9 @@ uint ZHeuristics::nconcurrent_workers() {
}
size_t ZHeuristics::significant_heap_overhead() {
return MaxHeapSize * ZFragmentationLimit;
return MaxHeapSize * (ZFragmentationLimit / 100);
}
size_t ZHeuristics::significant_young_overhead() {
return MaxHeapSize * ZYoungCompactionLimit;
return MaxHeapSize * (ZYoungCompactionLimit / 100);
}