From: vegorov@chromium.org Date: Wed, 28 Sep 2011 10:45:27 +0000 (+0000) Subject: EvacuateNewSpaceAndCandidates should explicitly skip dead large objects. X-Git-Tag: upstream/4.7.83~18341 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39512e148de577155bc2d3691036a10c317876a8;p=platform%2Fupstream%2Fv8.git EvacuateNewSpaceAndCandidates should explicitly skip dead large objects. LargeObjectSpace is swept at the very end of SweepSpaces. R=mstarzinger@chromium.org BUG=v8:1736 Review URL: http://codereview.chromium.org/8060013 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9460 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/mark-compact.cc b/src/mark-compact.cc index 948a6be..4b0f7e2 100644 --- a/src/mark-compact.cc +++ b/src/mark-compact.cc @@ -3035,6 +3035,10 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() { // It's difficult to filter out slots recorded for large objects. LargeObjectIterator it(heap_->lo_space()); for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) { + // LargeObjectSpace is not swept yet thus we have to skip + // dead objects explicitly. + if (!IsMarked(obj)) continue; + Page* p = Page::FromAddress(obj->address()); if (p->IsFlagSet(Page::RESCAN_ON_EVACUATION)) { obj->Iterate(&updating_visitor);