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

Commit

Permalink
8246045: ZGC: Fix ZDirector::rule_high_usage() calculation
Browse files Browse the repository at this point in the history
Reviewed-by: stefank, eosterlund
  • Loading branch information
pliden committed May 31, 2020
1 parent 231d9a0 commit 7467cd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/z/zDirector.cpp
Expand Up @@ -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);

Expand Down

0 comments on commit 7467cd2

Please sign in to comment.