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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 inline void OnMoveEvent(HeapObject* target, HeapObject* source, | 814 inline void OnMoveEvent(HeapObject* target, HeapObject* source, |
815 int size_in_bytes); | 815 int size_in_bytes); |
816 | 816 |
817 bool deserialization_complete() const { return deserialization_complete_; } | 817 bool deserialization_complete() const { return deserialization_complete_; } |
818 | 818 |
819 bool HasLowAllocationRate(); | 819 bool HasLowAllocationRate(); |
820 bool HasHighFragmentation(); | 820 bool HasHighFragmentation(); |
821 bool HasHighFragmentation(intptr_t used, intptr_t committed); | 821 bool HasHighFragmentation(intptr_t used, intptr_t committed); |
822 | 822 |
823 void SetOptimizeForLatency() { optimize_for_memory_usage_ = false; } | 823 void SetOptimizeForLatency() { optimize_for_memory_usage_ = false; } |
824 void SetOptimizeForMemoryUsage() { optimize_for_memory_usage_ = true; } | 824 void SetOptimizeForMemoryUsage(); |
825 bool ShouldOptimizeForMemoryUsage() { return optimize_for_memory_usage_; } | 825 bool ShouldOptimizeForMemoryUsage() { return optimize_for_memory_usage_; } |
826 | 826 |
827 // =========================================================================== | 827 // =========================================================================== |
828 // Initialization. =========================================================== | 828 // Initialization. =========================================================== |
829 // =========================================================================== | 829 // =========================================================================== |
830 | 830 |
831 // Configure heap size in MB before setup. Return false if the heap has been | 831 // Configure heap size in MB before setup. Return false if the heap has been |
832 // set up already. | 832 // set up already. |
833 bool ConfigureHeap(int max_semi_space_size, int max_old_space_size, | 833 bool ConfigureHeap(int max_semi_space_size, int max_old_space_size, |
834 int max_executable_size, size_t code_range_size); | 834 int max_executable_size, size_t code_range_size); |
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2626 friend class LargeObjectSpace; | 2626 friend class LargeObjectSpace; |
2627 friend class NewSpace; | 2627 friend class NewSpace; |
2628 friend class PagedSpace; | 2628 friend class PagedSpace; |
2629 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2629 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2630 }; | 2630 }; |
2631 | 2631 |
2632 } // namespace internal | 2632 } // namespace internal |
2633 } // namespace v8 | 2633 } // namespace v8 |
2634 | 2634 |
2635 #endif // V8_HEAP_HEAP_H_ | 2635 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |