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

Side by Side Diff: src/heap/spaces-inl.h

Issue 2026633003: Reland "[heap] Fine-grained JSArrayBuffer tracking" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tests should not assert for promotion decisions but only for tracking Created 4 years, 6 months 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 unified diff | Download patch
« no previous file with comments | « src/heap/spaces.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_SPACES_INL_H_ 5 #ifndef V8_HEAP_SPACES_INL_H_
6 #define V8_HEAP_SPACES_INL_H_ 6 #define V8_HEAP_SPACES_INL_H_
7 7
8 #include "src/heap/incremental-marking.h" 8 #include "src/heap/incremental-marking.h"
9 #include "src/heap/spaces.h" 9 #include "src/heap/spaces.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 return page; 263 return page;
264 } 264 }
265 265
266 // -------------------------------------------------------------------------- 266 // --------------------------------------------------------------------------
267 // PagedSpace 267 // PagedSpace
268 268
269 template <Page::InitializationMode mode> 269 template <Page::InitializationMode mode>
270 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable, 270 Page* Page::Initialize(Heap* heap, MemoryChunk* chunk, Executability executable,
271 PagedSpace* owner) { 271 PagedSpace* owner) {
272 Page* page = reinterpret_cast<Page*>(chunk); 272 Page* page = reinterpret_cast<Page*>(chunk);
273 page->mutex_ = new base::Mutex();
274 DCHECK(page->area_size() <= kAllocatableMemory); 273 DCHECK(page->area_size() <= kAllocatableMemory);
275 DCHECK(chunk->owner() == owner); 274 DCHECK(chunk->owner() == owner);
276 275
277 owner->IncreaseCapacity(page->area_size()); 276 owner->IncreaseCapacity(page->area_size());
278 heap->incremental_marking()->SetOldSpacePageFlags(chunk); 277 heap->incremental_marking()->SetOldSpacePageFlags(chunk);
279 278
280 // Make sure that categories are initialized before freeing the area. 279 // Make sure that categories are initialized before freeing the area.
281 page->InitializeFreeListCategories(); 280 page->InitializeFreeListCategories();
282 // In the case we do not free the memory, we effectively account for the whole 281 // In the case we do not free the memory, we effectively account for the whole
283 // page as allocated memory that cannot be used for further allocations. 282 // page as allocated memory that cannot be used for further allocations.
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 other->allocation_info_.Reset(nullptr, nullptr); 713 other->allocation_info_.Reset(nullptr, nullptr);
715 return true; 714 return true;
716 } 715 }
717 return false; 716 return false;
718 } 717 }
719 718
720 } // namespace internal 719 } // namespace internal
721 } // namespace v8 720 } // namespace v8
722 721
723 #endif // V8_HEAP_SPACES_INL_H_ 722 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698