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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
833 | 833 |
834 // Converts the given boolean condition to JavaScript boolean value. | 834 // Converts the given boolean condition to JavaScript boolean value. |
835 inline Object* ToBoolean(bool condition); | 835 inline Object* ToBoolean(bool condition); |
836 | 836 |
837 // Check whether the heap is currently iterable. | 837 // Check whether the heap is currently iterable. |
838 bool IsHeapIterable(); | 838 bool IsHeapIterable(); |
839 | 839 |
840 // Notify the heap that a context has been disposed. | 840 // Notify the heap that a context has been disposed. |
841 int NotifyContextDisposed(bool dependant_context); | 841 int NotifyContextDisposed(bool dependant_context); |
842 | 842 |
843 void FinalizeIncrementalMarkingIfComplete(const char* comment); | |
Michael Lippautz
2015/09/03 15:01:49
nit: There's a section for incremental marking aro
ulan_google
2015/09/03 15:07:00
Done.
| |
844 | |
843 inline void increment_scan_on_scavenge_pages() { | 845 inline void increment_scan_on_scavenge_pages() { |
844 scan_on_scavenge_pages_++; | 846 scan_on_scavenge_pages_++; |
845 if (FLAG_gc_verbose) { | 847 if (FLAG_gc_verbose) { |
846 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); | 848 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); |
847 } | 849 } |
848 } | 850 } |
849 | 851 |
850 inline void decrement_scan_on_scavenge_pages() { | 852 inline void decrement_scan_on_scavenge_pages() { |
851 scan_on_scavenge_pages_--; | 853 scan_on_scavenge_pages_--; |
852 if (FLAG_gc_verbose) { | 854 if (FLAG_gc_verbose) { |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1029 // prepared by finishing the previous one. | 1031 // prepared by finishing the previous one. |
1030 void PrepareArrayBufferDiscoveryInNewSpace(); | 1032 void PrepareArrayBufferDiscoveryInNewSpace(); |
1031 | 1033 |
1032 // An ArrayBuffer moved from new space to old space. | 1034 // An ArrayBuffer moved from new space to old space. |
1033 void PromoteArrayBuffer(Object* buffer); | 1035 void PromoteArrayBuffer(Object* buffer); |
1034 | 1036 |
1035 bool HasLowAllocationRate(); | 1037 bool HasLowAllocationRate(); |
1036 bool HasHighFragmentation(); | 1038 bool HasHighFragmentation(); |
1037 bool HasHighFragmentation(intptr_t used, intptr_t committed); | 1039 bool HasHighFragmentation(intptr_t used, intptr_t committed); |
1038 | 1040 |
1041 bool ShouldOptimizeForMemoryUsage() { return optimize_for_memory_usage_; } | |
1042 | |
1039 // =========================================================================== | 1043 // =========================================================================== |
1040 // Initialization. =========================================================== | 1044 // Initialization. =========================================================== |
1041 // =========================================================================== | 1045 // =========================================================================== |
1042 | 1046 |
1043 // Configure heap size in MB before setup. Return false if the heap has been | 1047 // Configure heap size in MB before setup. Return false if the heap has been |
1044 // set up already. | 1048 // set up already. |
1045 bool ConfigureHeap(int max_semi_space_size, int max_old_space_size, | 1049 bool ConfigureHeap(int max_semi_space_size, int max_old_space_size, |
1046 int max_executable_size, size_t code_range_size); | 1050 int max_executable_size, size_t code_range_size); |
1047 bool ConfigureHeapDefault(); | 1051 bool ConfigureHeapDefault(); |
1048 | 1052 |
(...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2742 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2746 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2743 | 2747 |
2744 private: | 2748 private: |
2745 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2749 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2746 }; | 2750 }; |
2747 #endif // DEBUG | 2751 #endif // DEBUG |
2748 } | 2752 } |
2749 } // namespace v8::internal | 2753 } // namespace v8::internal |
2750 | 2754 |
2751 #endif // V8_HEAP_HEAP_H_ | 2755 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |