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; |
} |