Index: src/heap/spaces.cc |
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc |
index 0f50cdd0d35028a47fdb59d75a3a4c603267eeda..a734785b137ae4790c01306456f99056fa569117 100644 |
--- a/src/heap/spaces.cc |
+++ b/src/heap/spaces.cc |
@@ -1181,9 +1181,10 @@ bool PagedSpace::Expand() { |
// Pages created during bootstrapping may contain immortal immovable objects. |
if (!heap()->deserialization_complete()) p->MarkNeverEvacuate(); |
- // When incremental marking was activated, old generation pages are allocated |
+ // When incremental marking was activated, old space pages are allocated |
// black. |
- if (heap()->incremental_marking()->black_allocation()) { |
+ if (heap()->incremental_marking()->black_allocation() && |
+ identity() == OLD_SPACE) { |
Bitmap::SetAllBits(p); |
p->SetFlag(Page::BLACK_PAGE); |
if (FLAG_trace_incremental_marking) { |
@@ -2901,11 +2902,6 @@ AllocationResult LargeObjectSpace::AllocateRaw(int object_size, |
} |
HeapObject* object = page->GetObject(); |
- if (heap()->incremental_marking()->black_allocation()) { |
- MarkBit mark_bit = Marking::MarkBitFrom(object); |
- Marking::MarkBlack(mark_bit); |
- page->SetFlag(Page::BLACK_PAGE); |
- } |
MSAN_ALLOCATED_UNINITIALIZED_MEMORY(object->address(), object_size); |
if (Heap::ShouldZapGarbage()) { |