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

Unified Diff: src/heap.cc

Issue 6970004: Introduce lazy sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 7 months 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
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index a4596d38c2c777e6222bef4d488d1831d2f4d018..46f8dc9389ed0780b3d2a98e5945601257a4d4f7 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -478,7 +478,7 @@ bool Heap::CollectGarbage(AllocationSpace space, GarbageCollector collector) {
if (collector == MARK_COMPACTOR &&
!mark_compact_collector()->PreciseSweepingRequired() &&
- incremental_marking()->IsMarking() &&
+ incremental_marking()->IsMarkingIncomplete() &&
!incremental_marking()->should_hurry() &&
FLAG_incremental_marking_steps) {
if (FLAG_trace_incremental_marking) {
@@ -1003,6 +1003,9 @@ void Heap::Scavenge() {
incremental_marking()->PrepareForScavenge();
+ old_pointer_space()->AdvanceSweeper(new_space_.Size());
+ old_data_space()->AdvanceSweeper(new_space_.Size());
+
// Flip the semispaces. After flipping, to space is empty, from space has
// live objects.
new_space_.Flip();
« no previous file with comments | « src/heap.h ('k') | src/incremental-marking.h » ('j') | src/incremental-marking.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698