| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index c220b451c5d52bc457390ef47688495a36917c23..dbf0c8ed9aaee7b3b5e8d16fd8bbcbf9f69c66c4 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -265,7 +265,7 @@ GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space,
|
| }
|
|
|
| if (incremental_marking()->NeedsFinalization() &&
|
| - OldGenerationSpaceAvailable() == 0) {
|
| + AllocationLimitOvershotByLargeMargin()) {
|
| *reason = "Incremental marking needs finalization";
|
| return MARK_COMPACTOR;
|
| }
|
| @@ -5320,7 +5320,7 @@ bool Heap::ShouldExpandOldGenerationOnSlowAllocation() {
|
| if (ShouldOptimizeForMemoryUsage()) return false;
|
|
|
| if (incremental_marking()->NeedsFinalization()) {
|
| - return false;
|
| + return !AllocationLimitOvershotByLargeMargin();
|
| }
|
|
|
| if (incremental_marking()->IsStopped() &&
|
|
|