--- old/src/hotspot/share/gc/g1/g1HeapSizingPolicy.cpp 2020-02-11 11:34:44.738096643 +0100 +++ new/src/hotspot/share/gc/g1/g1HeapSizingPolicy.cpp 2020-02-11 11:34:44.332084161 +0100 @@ -64,8 +64,8 @@ // If the heap is at less than half its maximum size, scale the threshold down, // to a limit of 1. Thus the smaller the heap is, the more likely it is to expand, // though the scaling code will likely keep the increase small. - if (_g1h->capacity() <= _g1h->max_capacity() / 2) { - threshold *= (double)_g1h->capacity() / (double)(_g1h->max_capacity() / 2); + if (_g1h->capacity() <= _g1h->soft_max_capacity() / 2) { + threshold *= (double)_g1h->capacity() / (double)(_g1h->soft_max_capacity() / 2); threshold = MAX2(threshold, 1.0); }