Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: src/heap/heap.cc

Issue 2561103002: [heap] Prefer mark-compact over scavenger if incremental marking (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index e47478d4ea28b0a7578e0b5864936021c1c4ed41..29cfd04117fd994f4a3f4126200192e69df42704 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -264,6 +264,12 @@ GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space,
return MARK_COMPACTOR;
}
+ if (incremental_marking()->NeedsFinalization() &&
+ OldGenerationSpaceAvailable() == 0) {
+ *reason = "Incremental marking needs finalization";
+ return MARK_COMPACTOR;
+ }
+
// Is there enough space left in OLD to guarantee that a scavenge can
// succeed?
//
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698