Reviewers: dcarney,

Description:
Do not greedy GC if no allocation is expected/allowed.

[email protected]

Please review this at https://codereview.chromium.org/227513003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+1, -0 lines):
  M src/heap.cc


Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index b7f9d069d2e85c15ff7d24b6a9ea7b850df20239..381815dad734b9eda932a542d82c55266d30c0b1 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


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to