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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 // Sizes are in MB. | 1150 // Sizes are in MB. |
1151 static const int kMaxExecutableSizeLowMemoryDevice = 96 * kPointerMultiplier; | 1151 static const int kMaxExecutableSizeLowMemoryDevice = 96 * kPointerMultiplier; |
1152 static const int kMaxExecutableSizeMediumMemoryDevice = | 1152 static const int kMaxExecutableSizeMediumMemoryDevice = |
1153 192 * kPointerMultiplier; | 1153 192 * kPointerMultiplier; |
1154 static const int kMaxExecutableSizeHighMemoryDevice = | 1154 static const int kMaxExecutableSizeHighMemoryDevice = |
1155 256 * kPointerMultiplier; | 1155 256 * kPointerMultiplier; |
1156 static const int kMaxExecutableSizeHugeMemoryDevice = | 1156 static const int kMaxExecutableSizeHugeMemoryDevice = |
1157 256 * kPointerMultiplier; | 1157 256 * kPointerMultiplier; |
1158 | 1158 |
1159 static const int kTraceRingBufferSize = 512; | 1159 static const int kTraceRingBufferSize = 512; |
| 1160 static const int kStacktraceBufferSize = 512; |
1160 | 1161 |
1161 // Calculates the allocation limit based on a given growing factor and a | 1162 // Calculates the allocation limit based on a given growing factor and a |
1162 // given old generation size. | 1163 // given old generation size. |
1163 intptr_t CalculateOldGenerationAllocationLimit(double factor, | 1164 intptr_t CalculateOldGenerationAllocationLimit(double factor, |
1164 intptr_t old_gen_size); | 1165 intptr_t old_gen_size); |
1165 | 1166 |
1166 // Sets the allocation limit to trigger the next full garbage collection. | 1167 // Sets the allocation limit to trigger the next full garbage collection. |
1167 void SetOldGenerationAllocationLimit(intptr_t old_gen_size, | 1168 void SetOldGenerationAllocationLimit(intptr_t old_gen_size, |
1168 size_t current_allocation_throughput); | 1169 size_t current_allocation_throughput); |
1169 | 1170 |
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2326 int* weak_global_handle_count; // 11 | 2327 int* weak_global_handle_count; // 11 |
2327 int* pending_global_handle_count; // 12 | 2328 int* pending_global_handle_count; // 12 |
2328 int* near_death_global_handle_count; // 13 | 2329 int* near_death_global_handle_count; // 13 |
2329 int* free_global_handle_count; // 14 | 2330 int* free_global_handle_count; // 14 |
2330 intptr_t* memory_allocator_size; // 15 | 2331 intptr_t* memory_allocator_size; // 15 |
2331 intptr_t* memory_allocator_capacity; // 16 | 2332 intptr_t* memory_allocator_capacity; // 16 |
2332 int* objects_per_type; // 17 | 2333 int* objects_per_type; // 17 |
2333 int* size_per_type; // 18 | 2334 int* size_per_type; // 18 |
2334 int* os_error; // 19 | 2335 int* os_error; // 19 |
2335 char* last_few_messages; // 20 | 2336 char* last_few_messages; // 20 |
2336 int* end_marker; // 21 | 2337 char* js_stacktrace; // 21 |
| 2338 int* end_marker; // 22 |
2337 }; | 2339 }; |
2338 | 2340 |
2339 | 2341 |
2340 class AlwaysAllocateScope { | 2342 class AlwaysAllocateScope { |
2341 public: | 2343 public: |
2342 explicit inline AlwaysAllocateScope(Isolate* isolate); | 2344 explicit inline AlwaysAllocateScope(Isolate* isolate); |
2343 inline ~AlwaysAllocateScope(); | 2345 inline ~AlwaysAllocateScope(); |
2344 | 2346 |
2345 private: | 2347 private: |
2346 // Implicitly disable artificial allocation failures. | 2348 // Implicitly disable artificial allocation failures. |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2746 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2748 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2747 | 2749 |
2748 private: | 2750 private: |
2749 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2751 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2750 }; | 2752 }; |
2751 #endif // DEBUG | 2753 #endif // DEBUG |
2752 } | 2754 } |
2753 } // namespace v8::internal | 2755 } // namespace v8::internal |
2754 | 2756 |
2755 #endif // V8_HEAP_HEAP_H_ | 2757 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |