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