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

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

Issue 876613002: Only use FreeSpace objects in the free list. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 5 years, 10 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') | src/isolate.h » ('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/spaces.h" 8 #include "src/heap/spaces.h"
9 #include "src/heap-profiler.h" 9 #include "src/heap-profiler.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 LargePage* LargePage::Initialize(Heap* heap, MemoryChunk* chunk) { 298 LargePage* LargePage::Initialize(Heap* heap, MemoryChunk* chunk) {
299 heap->incremental_marking()->SetOldSpacePageFlags(chunk); 299 heap->incremental_marking()->SetOldSpacePageFlags(chunk);
300 return static_cast<LargePage*>(chunk); 300 return static_cast<LargePage*>(chunk);
301 } 301 }
302 302
303 303
304 intptr_t LargeObjectSpace::Available() { 304 intptr_t LargeObjectSpace::Available() {
305 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available()); 305 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available());
306 } 306 }
307 307
308
309 bool FreeListNode::IsFreeListNode(HeapObject* object) {
310 Map* map = object->map();
311 Heap* heap = object->GetHeap();
312 return map == heap->raw_unchecked_free_space_map() ||
313 map == heap->raw_unchecked_one_pointer_filler_map() ||
314 map == heap->raw_unchecked_two_pointer_filler_map();
315 }
316 } 308 }
317 } // namespace v8::internal 309 } // namespace v8::internal
318 310
319 #endif // V8_HEAP_SPACES_INL_H_ 311 #endif // V8_HEAP_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698