equal
deleted
inserted
replaced
51 |
51 |
52 bool ShenandoahCompactHeuristics::should_start_normal_gc() const { |
52 bool ShenandoahCompactHeuristics::should_start_normal_gc() const { |
53 ShenandoahHeap* heap = ShenandoahHeap::heap(); |
53 ShenandoahHeap* heap = ShenandoahHeap::heap(); |
54 |
54 |
55 size_t available = heap->free_set()->available(); |
55 size_t available = heap->free_set()->available(); |
56 size_t threshold_bytes_allocated = heap->capacity() * ShenandoahAllocationThreshold / 100; |
56 size_t threshold_bytes_allocated = heap->max_capacity() * ShenandoahAllocationThreshold / 100; |
57 size_t min_threshold = ShenandoahMinFreeThreshold * heap->capacity() / 100; |
57 size_t min_threshold = ShenandoahMinFreeThreshold * heap->max_capacity() / 100; |
58 |
58 |
59 if (available < min_threshold) { |
59 if (available < min_threshold) { |
60 log_info(gc)("Trigger: Free (" SIZE_FORMAT "M) is below minimum threshold (" SIZE_FORMAT "M)", |
60 log_info(gc)("Trigger: Free (" SIZE_FORMAT "M) is below minimum threshold (" SIZE_FORMAT "M)", |
61 available / M, min_threshold / M); |
61 available / M, min_threshold / M); |
62 return true; |
62 return true; |