< prev index next >

src/hotspot/share/gc/shenandoah/heuristics/shenandoahStaticHeuristics.cpp

Print this page
*** 40,11 ***
  
  ShenandoahStaticHeuristics::~ShenandoahStaticHeuristics() {}
  
  bool ShenandoahStaticHeuristics::should_start_gc() {
    size_t max_capacity = _space_info->max_capacity();
!   size_t capacity = _space_info->soft_max_capacity();
    size_t available = _space_info->available();
  
    // Make sure the code below treats available without the soft tail.
    size_t soft_tail = max_capacity - capacity;
    available = (available > soft_tail) ? (available - soft_tail) : 0;
--- 40,11 ---
  
  ShenandoahStaticHeuristics::~ShenandoahStaticHeuristics() {}
  
  bool ShenandoahStaticHeuristics::should_start_gc() {
    size_t max_capacity = _space_info->max_capacity();
!   size_t capacity = ShenandoahHeap::heap()->soft_max_capacity();
    size_t available = _space_info->available();
  
    // Make sure the code below treats available without the soft tail.
    size_t soft_tail = max_capacity - capacity;
    available = (available > soft_tail) ? (available - soft_tail) : 0;
< prev index next >