equal
deleted
inserted
replaced
50 ShenandoahStaticHeuristics::~ShenandoahStaticHeuristics() {} |
50 ShenandoahStaticHeuristics::~ShenandoahStaticHeuristics() {} |
51 |
51 |
52 bool ShenandoahStaticHeuristics::should_start_normal_gc() const { |
52 bool ShenandoahStaticHeuristics::should_start_normal_gc() const { |
53 ShenandoahHeap* heap = ShenandoahHeap::heap(); |
53 ShenandoahHeap* heap = ShenandoahHeap::heap(); |
54 |
54 |
55 size_t capacity = heap->capacity(); |
55 size_t capacity = heap->max_capacity(); |
56 size_t available = heap->free_set()->available(); |
56 size_t available = heap->free_set()->available(); |
57 size_t threshold_available = (capacity * ShenandoahFreeThreshold) / 100; |
57 size_t threshold_available = (capacity * ShenandoahFreeThreshold) / 100; |
58 |
58 |
59 if (available < threshold_available) { |
59 if (available < threshold_available) { |
60 log_info(gc)("Trigger: Free (" SIZE_FORMAT "M) is below free threshold (" SIZE_FORMAT "M)", |
60 log_info(gc)("Trigger: Free (" SIZE_FORMAT "M) is below free threshold (" SIZE_FORMAT "M)", |