OLD | NEW |
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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 available_in_free_list_.Increment(available); | 762 available_in_free_list_.Increment(available); |
763 } | 763 } |
764 void remove_available_in_free_list(size_t available) { | 764 void remove_available_in_free_list(size_t available) { |
765 DCHECK_LE(available, area_size()); | 765 DCHECK_LE(available, area_size()); |
766 DCHECK_GE(available_in_free_list(), available); | 766 DCHECK_GE(available_in_free_list(), available); |
767 available_in_free_list_.Decrement(available); | 767 available_in_free_list_.Decrement(available); |
768 } | 768 } |
769 | 769 |
770 size_t ShrinkToHighWaterMark(); | 770 size_t ShrinkToHighWaterMark(); |
771 | 771 |
| 772 void CreateBlackArea(Address start, Address end); |
| 773 |
772 #ifdef DEBUG | 774 #ifdef DEBUG |
773 void Print(); | 775 void Print(); |
774 #endif // DEBUG | 776 #endif // DEBUG |
775 | 777 |
776 private: | 778 private: |
777 enum InitializationMode { kFreeMemory, kDoNotFreeMemory }; | 779 enum InitializationMode { kFreeMemory, kDoNotFreeMemory }; |
778 | 780 |
779 template <InitializationMode mode = kFreeMemory> | 781 template <InitializationMode mode = kFreeMemory> |
780 static inline Page* Initialize(Heap* heap, MemoryChunk* chunk, | 782 static inline Page* Initialize(Heap* heap, MemoryChunk* chunk, |
781 Executability executable, PagedSpace* owner); | 783 Executability executable, PagedSpace* owner); |
(...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2902 PageIterator old_iterator_; | 2904 PageIterator old_iterator_; |
2903 PageIterator code_iterator_; | 2905 PageIterator code_iterator_; |
2904 PageIterator map_iterator_; | 2906 PageIterator map_iterator_; |
2905 LargePageIterator lo_iterator_; | 2907 LargePageIterator lo_iterator_; |
2906 }; | 2908 }; |
2907 | 2909 |
2908 } // namespace internal | 2910 } // namespace internal |
2909 } // namespace v8 | 2911 } // namespace v8 |
2910 | 2912 |
2911 #endif // V8_HEAP_SPACES_H_ | 2913 #endif // V8_HEAP_SPACES_H_ |
OLD | NEW |