Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 2aac8b0dd01ed23c7f95363b33678849067d6191..27f48d3a662158f4d0679d83b00144812332a659 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -3817,8 +3817,9 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) { |
intptr_t old_space_size = heap()->PromotedSpaceSizeOfObjects(); |
intptr_t space_left = |
- Min(heap()->OldGenPromotionLimit(old_space_size), |
- heap()->OldGenAllocationLimit(old_space_size)) - old_space_size; |
+ Min(heap()->OldGenLimit(old_space_size, Heap::kMinPromotionLimit), |
+ heap()->OldGenLimit(old_space_size, Heap::kMinAllocationLimit)) - |
+ old_space_size; |
while (it.has_next()) { |
Page* p = it.next(); |