| 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 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 bool MaximumSizeScavenge() { return maximum_size_scavenges_ > 0; } | 1847 bool MaximumSizeScavenge() { return maximum_size_scavenges_ > 0; } |
| 1848 | 1848 |
| 1849 // =========================================================================== | 1849 // =========================================================================== |
| 1850 // Growing strategy. ========================================================= | 1850 // Growing strategy. ========================================================= |
| 1851 // =========================================================================== | 1851 // =========================================================================== |
| 1852 | 1852 |
| 1853 // For some webpages RAIL mode does not switch from PERFORMANCE_LOAD. | 1853 // For some webpages RAIL mode does not switch from PERFORMANCE_LOAD. |
| 1854 // This constant limits the effect of load RAIL mode on GC. | 1854 // This constant limits the effect of load RAIL mode on GC. |
| 1855 // The value is arbitrary and chosen as the largest load time observed in | 1855 // The value is arbitrary and chosen as the largest load time observed in |
| 1856 // v8 browsing benchmarks. | 1856 // v8 browsing benchmarks. |
| 1857 static const int kMaxLoadTimeMs = 3000; | 1857 static const int kMaxLoadTimeMs = 7000; |
| 1858 | 1858 |
| 1859 bool ShouldOptimizeForLoadTime(); | 1859 bool ShouldOptimizeForLoadTime(); |
| 1860 | 1860 |
| 1861 // Decrease the allocation limit if the new limit based on the given | 1861 // Decrease the allocation limit if the new limit based on the given |
| 1862 // parameters is lower than the current limit. | 1862 // parameters is lower than the current limit. |
| 1863 void DampenOldGenerationAllocationLimit(size_t old_gen_size, double gc_speed, | 1863 void DampenOldGenerationAllocationLimit(size_t old_gen_size, double gc_speed, |
| 1864 double mutator_speed); | 1864 double mutator_speed); |
| 1865 | 1865 |
| 1866 // Calculates the allocation limit based on a given growing factor and a | 1866 // Calculates the allocation limit based on a given growing factor and a |
| 1867 // given old generation size. | 1867 // given old generation size. |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2676 friend class LargeObjectSpace; | 2676 friend class LargeObjectSpace; |
| 2677 friend class NewSpace; | 2677 friend class NewSpace; |
| 2678 friend class PagedSpace; | 2678 friend class PagedSpace; |
| 2679 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2679 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
| 2680 }; | 2680 }; |
| 2681 | 2681 |
| 2682 } // namespace internal | 2682 } // namespace internal |
| 2683 } // namespace v8 | 2683 } // namespace v8 |
| 2684 | 2684 |
| 2685 #endif // V8_HEAP_HEAP_H_ | 2685 #endif // V8_HEAP_HEAP_H_ |
| OLD | NEW |