Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 5f22565fb9268a21bb5e548c9a74c8ed77067d82..a3dda72af2b7241cb700870869def9d215c9d36a 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -541,6 +541,7 @@ void MarkCompactCollector::WaitUntilSweepingCompleted() { |
heap()->isolate()->sweeper_threads()[i]->WaitForSweeperThread(); |
} |
sweeping_pending_ = false; |
+ ReleaseEvacuationCandidates(); |
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_DATA_SPACE)); |
StealMemoryFromSweeperThreads(heap()->paged_space(OLD_POINTER_SPACE)); |
heap()->FreeQueuedChunks(); |
@@ -3280,6 +3281,11 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() { |
slots_buffer_allocator_.DeallocateChain(&migration_slots_buffer_); |
ASSERT(migration_slots_buffer_ == NULL); |
+} |
+ |
+ |
+void MarkCompactCollector::ReleaseEvacuationCandidates() { |
+ int npages = evacuation_candidates_.length(); |
for (int i = 0; i < npages; i++) { |
Page* p = evacuation_candidates_[i]; |
if (!p->IsEvacuationCandidate()) continue; |
@@ -3877,6 +3883,10 @@ void MarkCompactCollector::SweepSpaces() { |
// Deallocate unmarked objects and clear marked bits for marked objects. |
heap_->lo_space()->FreeUnmarkedObjects(); |
+ |
+ if (!AreSweeperThreadsActivated()) { |
Michael Starzinger
2013/02/20 18:20:07
... but called down here at this call-site. Also I
Hannes Payer (out of office)
2013/02/21 12:05:17
The right condition is "if (!FLAG_concurrent_sweep
|
+ ReleaseEvacuationCandidates(); |
+ } |
} |