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

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

Issue 2806493002: [heap] Move a few methods from spaces.h to spaces.cc (Closed)
Patch Set: add V8_EXPORT_PRIVATE annotations Created 3 years, 8 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/spaces.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_SPACES_H_ 5 #ifndef V8_HEAP_SPACES_H_
6 #define V8_HEAP_SPACES_H_ 6 #define V8_HEAP_SPACES_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <unordered_set> 10 #include <unordered_set>
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 virtual ~Space() {} 875 virtual ~Space() {}
876 876
877 Heap* heap() const { return heap_; } 877 Heap* heap() const { return heap_; }
878 878
879 // Does the space need executable memory? 879 // Does the space need executable memory?
880 Executability executable() { return executable_; } 880 Executability executable() { return executable_; }
881 881
882 // Identity used in error reporting. 882 // Identity used in error reporting.
883 AllocationSpace identity() { return id_; } 883 AllocationSpace identity() { return id_; }
884 884
885 virtual void AddAllocationObserver(AllocationObserver* observer) { 885 V8_EXPORT_PRIVATE virtual void AddAllocationObserver(
886 allocation_observers_->Add(observer); 886 AllocationObserver* observer);
887 }
888 887
889 virtual void RemoveAllocationObserver(AllocationObserver* observer) { 888 V8_EXPORT_PRIVATE virtual void RemoveAllocationObserver(
890 bool removed = allocation_observers_->RemoveElement(observer); 889 AllocationObserver* observer);
891 USE(removed);
892 DCHECK(removed);
893 }
894 890
895 virtual void PauseAllocationObservers() { 891 V8_EXPORT_PRIVATE virtual void PauseAllocationObservers();
896 allocation_observers_paused_ = true;
897 }
898 892
899 virtual void ResumeAllocationObservers() { 893 V8_EXPORT_PRIVATE virtual void ResumeAllocationObservers();
900 allocation_observers_paused_ = false;
901 }
902 894
903 void AllocationStep(Address soon_object, int size); 895 void AllocationStep(Address soon_object, int size);
904 896
905 // Return the total amount committed memory for this space, i.e., allocatable 897 // Return the total amount committed memory for this space, i.e., allocatable
906 // memory and page headers. 898 // memory and page headers.
907 virtual size_t CommittedMemory() { return committed_; } 899 virtual size_t CommittedMemory() { return committed_; }
908 900
909 virtual size_t MaximumCommittedMemory() { return max_committed_; } 901 virtual size_t MaximumCommittedMemory() { return max_committed_; }
910 902
911 // Returns allocated size. 903 // Returns allocated size.
(...skipping 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
2959 PageIterator old_iterator_; 2951 PageIterator old_iterator_;
2960 PageIterator code_iterator_; 2952 PageIterator code_iterator_;
2961 PageIterator map_iterator_; 2953 PageIterator map_iterator_;
2962 LargePageIterator lo_iterator_; 2954 LargePageIterator lo_iterator_;
2963 }; 2955 };
2964 2956
2965 } // namespace internal 2957 } // namespace internal
2966 } // namespace v8 2958 } // namespace v8
2967 2959
2968 #endif // V8_HEAP_SPACES_H_ 2960 #endif // V8_HEAP_SPACES_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698