Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8246045: ZGC: Fix ZDirector::rule_high_usage() calculation
Reviewed-by: stefank, eosterlund
  • Loading branch information
pliden committed May 31, 2020
1 parent 231d9a0 commit 7467cd2ee5d732056197ec402b483d87c526281d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/hotspot/share/gc/z/zDirector.cpp
@@ -186,7 +186,7 @@ bool ZDirector::rule_high_usage() const {
const size_t soft_max_capacity = ZHeap::heap()->soft_max_capacity();
const size_t max_reserve = ZHeap::heap()->max_reserve();
const size_t used = ZHeap::heap()->used();
const size_t free_with_reserve = soft_max_capacity - used;
const size_t free_with_reserve = soft_max_capacity - MIN2(soft_max_capacity, used);
const size_t free = free_with_reserve - MIN2(free_with_reserve, max_reserve);
const double free_percent = percent_of(free, soft_max_capacity);

0 comments on commit 7467cd2

Please sign in to comment.