Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index 2465fac3b615ea780297b37ed7d83e0180798a29..3e5dafe345a481f08f88f20fd971db40e8894af7 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -3281,10 +3281,18 @@ |
// Set up compaction spaces. |
Evacuator** evacuators = new Evacuator*[num_tasks]; |
+ CompactionSpaceCollection** compaction_spaces_for_tasks = |
+ new CompactionSpaceCollection*[num_tasks]; |
for (int i = 0; i < num_tasks; i++) { |
evacuators[i] = new Evacuator(this, evacuation_candidates_, |
newspace_evacuation_candidates_); |
- } |
+ compaction_spaces_for_tasks[i] = evacuators[i]->compaction_spaces(); |
+ } |
+ heap()->old_space()->DivideUponCompactionSpaces(compaction_spaces_for_tasks, |
+ num_tasks); |
+ heap()->code_space()->DivideUponCompactionSpaces(compaction_spaces_for_tasks, |
+ num_tasks); |
+ delete[] compaction_spaces_for_tasks; |
// Kick off parallel tasks. |
StartParallelCompaction(evacuators, num_tasks); |