--- a/src/hotspot/share/gc/shenandoah/heuristics/shenandoahCompactHeuristics.cpp Tue Apr 09 12:17:03 2019 -0700
+++ b/src/hotspot/share/gc/shenandoah/heuristics/shenandoahCompactHeuristics.cpp Tue Apr 09 21:20:15 2019 +0200
@@ -53,8 +53,8 @@
ShenandoahHeap* heap = ShenandoahHeap::heap();
size_t available = heap->free_set()->available();
- size_t threshold_bytes_allocated = heap->capacity() * ShenandoahAllocationThreshold / 100;
- size_t min_threshold = ShenandoahMinFreeThreshold * heap->capacity() / 100;
+ size_t threshold_bytes_allocated = heap->max_capacity() * ShenandoahAllocationThreshold / 100;
+ size_t min_threshold = ShenandoahMinFreeThreshold * heap->max_capacity() / 100;
if (available < min_threshold) {
log_info(gc)("Trigger: Free (" SIZE_FORMAT "M) is below minimum threshold (" SIZE_FORMAT "M)",