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 static const int kMaxExecutableSizeMediumMemoryDevice = | 1150 static const int kMaxExecutableSizeMediumMemoryDevice = |
1151 192 * kPointerMultiplier; | 1151 192 * kPointerMultiplier; |
1152 static const int kMaxExecutableSizeHighMemoryDevice = | 1152 static const int kMaxExecutableSizeHighMemoryDevice = |
1153 256 * kPointerMultiplier; | 1153 256 * kPointerMultiplier; |
1154 static const int kMaxExecutableSizeHugeMemoryDevice = | 1154 static const int kMaxExecutableSizeHugeMemoryDevice = |
1155 256 * kPointerMultiplier; | 1155 256 * kPointerMultiplier; |
1156 | 1156 |
1157 static const int kTraceRingBufferSize = 512; | 1157 static const int kTraceRingBufferSize = 512; |
1158 static const int kStacktraceBufferSize = 512; | 1158 static const int kStacktraceBufferSize = 512; |
1159 | 1159 |
| 1160 static const double kMinHeapGrowingFactor; |
| 1161 static const double kMaxHeapGrowingFactor; |
| 1162 static const double kMaxHeapGrowingFactorMemoryConstrained; |
| 1163 static const double kMaxHeapGrowingFactorIdle; |
| 1164 static const double kTargetMutatorUtilization; |
| 1165 |
| 1166 static double HeapGrowingFactor(double gc_speed, double mutator_speed); |
| 1167 |
1160 // Calculates the allocation limit based on a given growing factor and a | 1168 // Calculates the allocation limit based on a given growing factor and a |
1161 // given old generation size. | 1169 // given old generation size. |
1162 intptr_t CalculateOldGenerationAllocationLimit(double factor, | 1170 intptr_t CalculateOldGenerationAllocationLimit(double factor, |
1163 intptr_t old_gen_size); | 1171 intptr_t old_gen_size); |
1164 | 1172 |
1165 // Sets the allocation limit to trigger the next full garbage collection. | 1173 // Sets the allocation limit to trigger the next full garbage collection. |
1166 void SetOldGenerationAllocationLimit(intptr_t old_gen_size, | 1174 void SetOldGenerationAllocationLimit(intptr_t old_gen_size, double gc_speed, |
1167 size_t current_allocation_throughput); | 1175 double mutator_speed); |
1168 | 1176 |
1169 // Indicates whether inline bump-pointer allocation has been disabled. | 1177 // Indicates whether inline bump-pointer allocation has been disabled. |
1170 bool inline_allocation_disabled() { return inline_allocation_disabled_; } | 1178 bool inline_allocation_disabled() { return inline_allocation_disabled_; } |
1171 | 1179 |
1172 // Switch whether inline bump-pointer allocation should be used. | 1180 // Switch whether inline bump-pointer allocation should be used. |
1173 void EnableInlineAllocation(); | 1181 void EnableInlineAllocation(); |
1174 void DisableInlineAllocation(); | 1182 void DisableInlineAllocation(); |
1175 | 1183 |
1176 // Implements the corresponding V8 API function. | 1184 // Implements the corresponding V8 API function. |
1177 bool IdleNotification(double deadline_in_seconds); | 1185 bool IdleNotification(double deadline_in_seconds); |
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2729 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2737 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2730 | 2738 |
2731 private: | 2739 private: |
2732 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2740 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2733 }; | 2741 }; |
2734 #endif // DEBUG | 2742 #endif // DEBUG |
2735 } | 2743 } |
2736 } // namespace v8::internal | 2744 } // namespace v8::internal |
2737 | 2745 |
2738 #endif // V8_HEAP_HEAP_H_ | 2746 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |