Chromium Code Reviews| Index: src/heap/spaces-inl.h |
| diff --git a/src/heap/spaces-inl.h b/src/heap/spaces-inl.h |
| index 685611e8151527a150a952be9ce47d28b64c0167..3d40a5457ad0a747ac4e8253db809d149b0b3958 100644 |
| --- a/src/heap/spaces-inl.h |
| +++ b/src/heap/spaces-inl.h |
| @@ -590,6 +590,17 @@ LargePage* LargePage::Initialize(Heap* heap, MemoryChunk* chunk, |
| FATAL("Code page is too large."); |
| } |
| heap->incremental_marking()->SetOldSpacePageFlags(chunk); |
| + |
| + // Initialize the owner field for each contained page (except the first, which |
| + // is initialized by MemoryChunk::Initialize). |
| + for (size_t i = Page::kPageSize; i < chunk->size(); i += Page::kPageSize) { |
| + Address& owner_addr = |
| + Memory::Address_at(chunk->address() + i + Page::kOwnerOffset); |
| + const Address new_owner_value = reinterpret_cast<Address>( |
| + reinterpret_cast<intptr_t>(owner_addr) & ~kPageHeaderTagMask); |
| + owner_addr = new_owner_value; |
|
Michael Lippautz
2016/12/09 20:09:40
Please just write
// Clear out kPageHeaderTag.
jgruber
2016/12/12 12:48:07
Done.
|
| + } |
| + |
| return static_cast<LargePage*>(chunk); |
| } |