Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: src/heap/heap.h

Issue 1705183003: Activate memory reducer for small heaps in background tabs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: typo Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698