| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 if (executable && chunk->size() > LargePage::kMaxCodePageSize) { | 673 if (executable && chunk->size() > LargePage::kMaxCodePageSize) { |
| 674 STATIC_ASSERT(LargePage::kMaxCodePageSize <= TypedSlotSet::kMaxOffset); | 674 STATIC_ASSERT(LargePage::kMaxCodePageSize <= TypedSlotSet::kMaxOffset); |
| 675 FATAL("Code page is too large."); | 675 FATAL("Code page is too large."); |
| 676 } | 676 } |
| 677 heap->incremental_marking()->SetOldSpacePageFlags(chunk); | 677 heap->incremental_marking()->SetOldSpacePageFlags(chunk); |
| 678 return static_cast<LargePage*>(chunk); | 678 return static_cast<LargePage*>(chunk); |
| 679 } | 679 } |
| 680 | 680 |
| 681 | 681 |
| 682 intptr_t LargeObjectSpace::Available() { | 682 intptr_t LargeObjectSpace::Available() { |
| 683 return ObjectSizeFor(heap()->isolate()->memory_allocator()->Available()); | 683 return ObjectSizeFor(heap()->memory_allocator()->Available()); |
| 684 } | 684 } |
| 685 | 685 |
| 686 | 686 |
| 687 LocalAllocationBuffer LocalAllocationBuffer::InvalidBuffer() { | 687 LocalAllocationBuffer LocalAllocationBuffer::InvalidBuffer() { |
| 688 return LocalAllocationBuffer(nullptr, AllocationInfo(nullptr, nullptr)); | 688 return LocalAllocationBuffer(nullptr, AllocationInfo(nullptr, nullptr)); |
| 689 } | 689 } |
| 690 | 690 |
| 691 | 691 |
| 692 LocalAllocationBuffer LocalAllocationBuffer::FromResult(Heap* heap, | 692 LocalAllocationBuffer LocalAllocationBuffer::FromResult(Heap* heap, |
| 693 AllocationResult result, | 693 AllocationResult result, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 708 other->allocation_info_.Reset(nullptr, nullptr); | 708 other->allocation_info_.Reset(nullptr, nullptr); |
| 709 return true; | 709 return true; |
| 710 } | 710 } |
| 711 return false; | 711 return false; |
| 712 } | 712 } |
| 713 | 713 |
| 714 } // namespace internal | 714 } // namespace internal |
| 715 } // namespace v8 | 715 } // namespace v8 |
| 716 | 716 |
| 717 #endif // V8_HEAP_SPACES_INL_H_ | 717 #endif // V8_HEAP_SPACES_INL_H_ |
| OLD | NEW |