OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1813 return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE; | 1813 return (pretenure == TENURED) ? OLD_SPACE : NEW_SPACE; |
1814 } | 1814 } |
1815 | 1815 |
1816 HeapObject* DoubleAlignForDeserialization(HeapObject* object, int size); | 1816 HeapObject* DoubleAlignForDeserialization(HeapObject* object, int size); |
1817 | 1817 |
1818 // Allocate an uninitialized object. The memory is non-executable if the | 1818 // Allocate an uninitialized object. The memory is non-executable if the |
1819 // hardware and OS allow. This is the single choke-point for allocations | 1819 // hardware and OS allow. This is the single choke-point for allocations |
1820 // performed by the runtime and should not be bypassed (to extend this to | 1820 // performed by the runtime and should not be bypassed (to extend this to |
1821 // inlined allocations, use the Heap::DisableInlineAllocation() support). | 1821 // inlined allocations, use the Heap::DisableInlineAllocation() support). |
1822 MUST_USE_RESULT inline AllocationResult AllocateRaw( | 1822 MUST_USE_RESULT inline AllocationResult AllocateRaw( |
1823 int size_in_bytes, AllocationSpace space, AllocationSpace retry_space); | 1823 int size_in_bytes, AllocationSpace space, AllocationSpace retry_space, |
1824 bool double_align = false); | |
Benedikt Meurer
2015/05/08 11:47:42
Please don't use bool. Add an enum AlignmentConstr
Hannes Payer (out of office)
2015/05/08 11:59:25
Done.
| |
1824 | 1825 |
1825 // Allocates a heap object based on the map. | 1826 // Allocates a heap object based on the map. |
1826 MUST_USE_RESULT AllocationResult | 1827 MUST_USE_RESULT AllocationResult |
1827 Allocate(Map* map, AllocationSpace space, | 1828 Allocate(Map* map, AllocationSpace space, |
1828 AllocationSite* allocation_site = NULL); | 1829 AllocationSite* allocation_site = NULL); |
1829 | 1830 |
1830 // Allocates a partial map for bootstrapping. | 1831 // Allocates a partial map for bootstrapping. |
1831 MUST_USE_RESULT AllocationResult | 1832 MUST_USE_RESULT AllocationResult |
1832 AllocatePartialMap(InstanceType instance_type, int instance_size); | 1833 AllocatePartialMap(InstanceType instance_type, int instance_size); |
1833 | 1834 |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2639 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2640 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2640 | 2641 |
2641 private: | 2642 private: |
2642 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2643 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2643 }; | 2644 }; |
2644 #endif // DEBUG | 2645 #endif // DEBUG |
2645 } | 2646 } |
2646 } // namespace v8::internal | 2647 } // namespace v8::internal |
2647 | 2648 |
2648 #endif // V8_HEAP_HEAP_H_ | 2649 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |