| 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/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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 LargePage* LargePage::Initialize(Heap* heap, MemoryChunk* chunk, | 592 LargePage* LargePage::Initialize(Heap* heap, MemoryChunk* chunk, |
| 593 Executability executable, Space* owner) { | 593 Executability executable, Space* owner) { |
| 594 if (executable && chunk->size() > LargePage::kMaxCodePageSize) { | 594 if (executable && chunk->size() > LargePage::kMaxCodePageSize) { |
| 595 STATIC_ASSERT(LargePage::kMaxCodePageSize <= TypedSlotSet::kMaxOffset); | 595 STATIC_ASSERT(LargePage::kMaxCodePageSize <= TypedSlotSet::kMaxOffset); |
| 596 FATAL("Code page is too large."); | 596 FATAL("Code page is too large."); |
| 597 } | 597 } |
| 598 heap->incremental_marking()->SetOldSpacePageFlags(chunk); | 598 heap->incremental_marking()->SetOldSpacePageFlags(chunk); |
| 599 return static_cast<LargePage*>(chunk); | 599 return static_cast<LargePage*>(chunk); |
| 600 } | 600 } |
| 601 | 601 |
| 602 | 602 size_t LargeObjectSpace::Available() { |
| 603 intptr_t LargeObjectSpace::Available() { | |
| 604 return ObjectSizeFor(heap()->memory_allocator()->Available()); | 603 return ObjectSizeFor(heap()->memory_allocator()->Available()); |
| 605 } | 604 } |
| 606 | 605 |
| 607 | 606 |
| 608 LocalAllocationBuffer LocalAllocationBuffer::InvalidBuffer() { | 607 LocalAllocationBuffer LocalAllocationBuffer::InvalidBuffer() { |
| 609 return LocalAllocationBuffer(nullptr, AllocationInfo(nullptr, nullptr)); | 608 return LocalAllocationBuffer(nullptr, AllocationInfo(nullptr, nullptr)); |
| 610 } | 609 } |
| 611 | 610 |
| 612 | 611 |
| 613 LocalAllocationBuffer LocalAllocationBuffer::FromResult(Heap* heap, | 612 LocalAllocationBuffer LocalAllocationBuffer::FromResult(Heap* heap, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 629 other->allocation_info_.Reset(nullptr, nullptr); | 628 other->allocation_info_.Reset(nullptr, nullptr); |
| 630 return true; | 629 return true; |
| 631 } | 630 } |
| 632 return false; | 631 return false; |
| 633 } | 632 } |
| 634 | 633 |
| 635 } // namespace internal | 634 } // namespace internal |
| 636 } // namespace v8 | 635 } // namespace v8 |
| 637 | 636 |
| 638 #endif // V8_HEAP_SPACES_INL_H_ | 637 #endif // V8_HEAP_SPACES_INL_H_ |
| OLD | NEW |