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

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

Issue 2406363002: [heap] Use size_t in free list and evacuation candidate selection. (Closed)
Patch Set: fix typo Created 4 years, 2 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/heap/heap-utils.cc » ('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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 }); 272 });
273 } 273 }
274 274
275 intptr_t PagedSpace::RelinkFreeListCategories(Page* page) { 275 intptr_t PagedSpace::RelinkFreeListCategories(Page* page) {
276 DCHECK_EQ(this, page->owner()); 276 DCHECK_EQ(this, page->owner());
277 intptr_t added = 0; 277 intptr_t added = 0;
278 page->ForAllFreeListCategories([&added](FreeListCategory* category) { 278 page->ForAllFreeListCategories([&added](FreeListCategory* category) {
279 added += category->available(); 279 added += category->available();
280 category->Relink(); 280 category->Relink();
281 }); 281 });
282 DCHECK_EQ(page->AvailableInFreeList(), page->available_in_free_list());
282 return added; 283 return added;
283 } 284 }
284 285
285 MemoryChunk* MemoryChunk::FromAnyPointerAddress(Heap* heap, Address addr) { 286 MemoryChunk* MemoryChunk::FromAnyPointerAddress(Heap* heap, Address addr) {
286 MemoryChunk* chunk = MemoryChunk::FromAddress(addr); 287 MemoryChunk* chunk = MemoryChunk::FromAddress(addr);
287 uintptr_t offset = addr - chunk->address(); 288 uintptr_t offset = addr - chunk->address();
288 if (offset < MemoryChunk::kHeaderSize || !chunk->HasPageHeader()) { 289 if (offset < MemoryChunk::kHeaderSize || !chunk->HasPageHeader()) {
289 chunk = heap->lo_space()->FindPage(addr); 290 chunk = heap->lo_space()->FindPage(addr);
290 } 291 }
291 return chunk; 292 return chunk;
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 other->allocation_info_.Reset(nullptr, nullptr); 628 other->allocation_info_.Reset(nullptr, nullptr);
628 return true; 629 return true;
629 } 630 }
630 return false; 631 return false;
631 } 632 }
632 633
633 } // namespace internal 634 } // namespace internal
634 } // namespace v8 635 } // namespace v8
635 636
636 #endif // V8_HEAP_SPACES_INL_H_ 637 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | test/cctest/heap/heap-utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698