From 97a223e569e4dc2430e258d085c52ec79d929ae6 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Mon, 7 Apr 2014 13:36:43 +0000 Subject: [PATCH] Do not greedy GC if no allocation is expected/allowed. R=dcarney@chromium.org Review URL: https://codereview.chromium.org/227513003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/heap.cc b/src/heap.cc index b7f9d069d2..381815dad7 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -7528,6 +7528,7 @@ void Heap::GarbageCollectionGreedyCheck() { ASSERT(FLAG_gc_greedy); if (isolate_->bootstrapper()->IsActive()) return; if (!AllowAllocationFailure::IsAllowed(isolate_)) return; + if (!AllowHeapAllocation::IsAllowed(isolate_)) return; CollectGarbage(NEW_SPACE); } #endif