There are no evacuation candidates and slot buffers when marking is started.

BUG=

Review URL: https://codereview.chromium.org/939163002

Cr-Commit-Position: refs/heads/master@{#26770}
This commit is contained in:
hpayer 2015-02-20 03:35:36 -08:00 committed by Commit bot
parent c4d2234e79
commit 916deea527

View File

@ -723,7 +723,12 @@ void MarkCompactCollector::CollectEvacuationCandidates(PagedSpace* space) {
while (it.has_next()) {
Page* p = it.next();
if (p->NeverEvacuate()) continue;
p->ClearEvacuationCandidate();
// Invariant: Evacuation candidates are just created when marking is
// started. At the end of a GC all evacuation candidates are cleared and
// their slot buffers are released.
CHECK(!p->IsEvacuationCandidate());
CHECK(p->slots_buffer() == NULL);
if (FLAG_stress_compaction) {
unsigned int counter = space->heap()->ms_count();