Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 67f6e8e0a7556c89a1f5162ac441ec3da5b4a1c4..a42bb706b0099f2ddb0479f4d65e16802cd31afa 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -3812,12 +3812,6 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) { |
bool lazy_sweeping_active = false; |
bool unused_page_present = false; |
- intptr_t old_space_size = heap()->PromotedSpaceSizeOfObjects(); |
- intptr_t space_left = |
- 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(); |
@@ -3877,7 +3871,7 @@ void MarkCompactCollector::SweepSpace(PagedSpace* space, SweeperType sweeper) { |
} |
freed_bytes += SweepConservatively(space, p); |
pages_swept++; |
- if (space_left + freed_bytes > newspace_size) { |
+ if (freed_bytes > 2 * newspace_size) { |
space->SetPagesToSweep(p->next_page()); |
lazy_sweeping_active = true; |
} else { |