| 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 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 | 1195 |
| 1196 static double HeapGrowingFactor(double gc_speed, double mutator_speed); | 1196 static double HeapGrowingFactor(double gc_speed, double mutator_speed); |
| 1197 | 1197 |
| 1198 // Calculates the allocation limit based on a given growing factor and a | 1198 // Calculates the allocation limit based on a given growing factor and a |
| 1199 // given old generation size. | 1199 // given old generation size. |
| 1200 intptr_t CalculateOldGenerationAllocationLimit(double factor, | 1200 intptr_t CalculateOldGenerationAllocationLimit(double factor, |
| 1201 intptr_t old_gen_size); | 1201 intptr_t old_gen_size); |
| 1202 | 1202 |
| 1203 // Sets the allocation limit to trigger the next full garbage collection. | 1203 // Sets the allocation limit to trigger the next full garbage collection. |
| 1204 void SetOldGenerationAllocationLimit(intptr_t old_gen_size, double gc_speed, | 1204 void SetOldGenerationAllocationLimit(intptr_t old_gen_size, double gc_speed, |
| 1205 double mutator_speed, | 1205 double mutator_speed); |
| 1206 int freed_global_handles); | |
| 1207 | 1206 |
| 1208 // Decrease the allocation limit if the new limit based on the given | 1207 // Decrease the allocation limit if the new limit based on the given |
| 1209 // parameters is lower than the current limit. | 1208 // parameters is lower than the current limit. |
| 1210 void DampenOldGenerationAllocationLimit(intptr_t old_gen_size, | 1209 void DampenOldGenerationAllocationLimit(intptr_t old_gen_size, |
| 1211 double gc_speed, | 1210 double gc_speed, |
| 1212 double mutator_speed); | 1211 double mutator_speed); |
| 1213 | 1212 |
| 1214 // Indicates whether inline bump-pointer allocation has been disabled. | 1213 // Indicates whether inline bump-pointer allocation has been disabled. |
| 1215 bool inline_allocation_disabled() { return inline_allocation_disabled_; } | 1214 bool inline_allocation_disabled() { return inline_allocation_disabled_; } |
| 1216 | 1215 |
| (...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2832 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2831 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2833 | 2832 |
| 2834 private: | 2833 private: |
| 2835 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2834 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2836 }; | 2835 }; |
| 2837 #endif // DEBUG | 2836 #endif // DEBUG |
| 2838 } | 2837 } |
| 2839 } // namespace v8::internal | 2838 } // namespace v8::internal |
| 2840 | 2839 |
| 2841 #endif // V8_HEAP_HEAP_H_ | 2840 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |