OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |