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

Unified Diff: src/heap/mark-compact.cc

Issue 1518803005: Reland of "[cctest] Add tests for aborting compaction of pages" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Filter out never allocate pages during initializing sweeping Created 5 years 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.h » ('j') | src/heap/spaces.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 4f16a3ae3815c0356bf83d22578795dc6f919aa7..70c38f8ebb96bfa6dfdec6e857cd3e10cacc971a 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -3774,6 +3774,14 @@ void MarkCompactCollector::StartSweepSpace(PagedSpace* space) {
continue;
}
+ if (p->IsFlagSet(Page::NEVER_ALLOCATE_ON_PAGE)) {
+ // We do not sweep pages that are marked to be ignored for allocation.
+ p->SetWasSwept();
+ Bitmap::Clear(p);
+ p->ResetLiveBytes();
Hannes Payer (out of office) 2015/12/16 12:07:14 Should we really reset live bytes here? That would
Michael Lippautz 2015/12/16 12:13:14 We reset live bytes after sweeping a page. I think
Hannes Payer (out of office) 2015/12/16 12:44:00 Acknowledged.
+ continue;
+ }
+
// One unused page is kept, all further are released before sweeping them.
if (p->LiveBytes() == 0) {
if (unused_page_present) {
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/spaces.h » ('j') | src/heap/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698