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

Unified Diff: src/heap/spaces.h

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
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 40604d424cc425b43871446b53d41599fd395a6c..a35919fe75a0993458d164d5323b220d4e7ccc23 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -323,6 +323,9 @@ class MemoryChunk {
// candidates selection cycle.
FORCE_EVACUATION_CANDIDATE_FOR_TESTING,
+ // This flag is inteded to be used for testing.
+ NEVER_ALLOCATE_ON_PAGE,
+
// The memory chunk is already logically freed, however the actual freeing
// still has to be performed.
PRE_FREED,
@@ -682,6 +685,10 @@ class MemoryChunk {
return IsFlagSet(EVACUATION_CANDIDATE);
}
+ bool CanAllocateOnPage() {
Hannes Payer (out of office) 2015/12/16 12:07:14 Just call it CanAllocate, since it is called on Pa
Michael Lippautz 2015/12/16 12:13:14 Done.
+ return !IsEvacuationCandidate() && !IsFlagSet(NEVER_ALLOCATE_ON_PAGE);
+ }
+
bool ShouldSkipEvacuationSlotRecording() {
return (flags_ & kSkipEvacuationSlotsRecordingMask) != 0;
}
« src/heap/mark-compact.cc ('K') | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698