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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 V(Map, sloppy_arguments_elements_map, SloppyArgumentsElementsMap) \ | 91 V(Map, sloppy_arguments_elements_map, SloppyArgumentsElementsMap) \ |
92 V(Map, message_object_map, JSMessageObjectMap) \ | 92 V(Map, message_object_map, JSMessageObjectMap) \ |
93 V(Map, external_map, ExternalMap) \ | 93 V(Map, external_map, ExternalMap) \ |
94 V(Map, bytecode_array_map, BytecodeArrayMap) \ | 94 V(Map, bytecode_array_map, BytecodeArrayMap) \ |
95 V(Map, module_info_map, ModuleInfoMap) \ | 95 V(Map, module_info_map, ModuleInfoMap) \ |
96 /* String maps */ \ | 96 /* String maps */ \ |
97 V(Map, native_source_string_map, NativeSourceStringMap) \ | 97 V(Map, native_source_string_map, NativeSourceStringMap) \ |
98 V(Map, string_map, StringMap) \ | 98 V(Map, string_map, StringMap) \ |
99 V(Map, cons_one_byte_string_map, ConsOneByteStringMap) \ | 99 V(Map, cons_one_byte_string_map, ConsOneByteStringMap) \ |
100 V(Map, cons_string_map, ConsStringMap) \ | 100 V(Map, cons_string_map, ConsStringMap) \ |
| 101 V(Map, thin_one_byte_string_map, ThinOneByteStringMap) \ |
| 102 V(Map, thin_string_map, ThinStringMap) \ |
101 V(Map, sliced_string_map, SlicedStringMap) \ | 103 V(Map, sliced_string_map, SlicedStringMap) \ |
102 V(Map, sliced_one_byte_string_map, SlicedOneByteStringMap) \ | 104 V(Map, sliced_one_byte_string_map, SlicedOneByteStringMap) \ |
103 V(Map, external_string_map, ExternalStringMap) \ | 105 V(Map, external_string_map, ExternalStringMap) \ |
104 V(Map, external_string_with_one_byte_data_map, \ | 106 V(Map, external_string_with_one_byte_data_map, \ |
105 ExternalStringWithOneByteDataMap) \ | 107 ExternalStringWithOneByteDataMap) \ |
106 V(Map, external_one_byte_string_map, ExternalOneByteStringMap) \ | 108 V(Map, external_one_byte_string_map, ExternalOneByteStringMap) \ |
107 V(Map, short_external_string_map, ShortExternalStringMap) \ | 109 V(Map, short_external_string_map, ShortExternalStringMap) \ |
108 V(Map, short_external_string_with_one_byte_data_map, \ | 110 V(Map, short_external_string_with_one_byte_data_map, \ |
109 ShortExternalStringWithOneByteDataMap) \ | 111 ShortExternalStringWithOneByteDataMap) \ |
110 V(Map, internalized_string_map, InternalizedStringMap) \ | 112 V(Map, internalized_string_map, InternalizedStringMap) \ |
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2109 // Allocates a new utility object in the old generation. | 2111 // Allocates a new utility object in the old generation. |
2110 MUST_USE_RESULT AllocationResult AllocateStruct(InstanceType type); | 2112 MUST_USE_RESULT AllocationResult AllocateStruct(InstanceType type); |
2111 | 2113 |
2112 // Allocates a new foreign object. | 2114 // Allocates a new foreign object. |
2113 MUST_USE_RESULT AllocationResult | 2115 MUST_USE_RESULT AllocationResult |
2114 AllocateForeign(Address address, PretenureFlag pretenure = NOT_TENURED); | 2116 AllocateForeign(Address address, PretenureFlag pretenure = NOT_TENURED); |
2115 | 2117 |
2116 MUST_USE_RESULT AllocationResult | 2118 MUST_USE_RESULT AllocationResult |
2117 AllocateCode(int object_size, bool immovable); | 2119 AllocateCode(int object_size, bool immovable); |
2118 | 2120 |
2119 MUST_USE_RESULT AllocationResult InternalizeStringWithKey(HashTableKey* key); | |
2120 | |
2121 MUST_USE_RESULT AllocationResult InternalizeString(String* str); | |
2122 | |
2123 // =========================================================================== | 2121 // =========================================================================== |
2124 | 2122 |
2125 void set_force_oom(bool value) { force_oom_ = value; } | 2123 void set_force_oom(bool value) { force_oom_ = value; } |
2126 | 2124 |
2127 // The amount of external memory registered through the API. | 2125 // The amount of external memory registered through the API. |
2128 int64_t external_memory_; | 2126 int64_t external_memory_; |
2129 | 2127 |
2130 // The limit when to trigger memory pressure from the API. | 2128 // The limit when to trigger memory pressure from the API. |
2131 int64_t external_memory_limit_; | 2129 int64_t external_memory_limit_; |
2132 | 2130 |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2676 friend class LargeObjectSpace; | 2674 friend class LargeObjectSpace; |
2677 friend class NewSpace; | 2675 friend class NewSpace; |
2678 friend class PagedSpace; | 2676 friend class PagedSpace; |
2679 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2677 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2680 }; | 2678 }; |
2681 | 2679 |
2682 } // namespace internal | 2680 } // namespace internal |
2683 } // namespace v8 | 2681 } // namespace v8 |
2684 | 2682 |
2685 #endif // V8_HEAP_HEAP_H_ | 2683 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |