| 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 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 if (chunk != nullptr) { | 1126 if (chunk != nullptr) { |
| 1127 // For stolen chunks we need to manually free any allocated memory. | 1127 // For stolen chunks we need to manually free any allocated memory. |
| 1128 chunk->ReleaseAllocatedMemory(); | 1128 chunk->ReleaseAllocatedMemory(); |
| 1129 } | 1129 } |
| 1130 } | 1130 } |
| 1131 return chunk; | 1131 return chunk; |
| 1132 } | 1132 } |
| 1133 | 1133 |
| 1134 void FreeQueuedChunks(); | 1134 void FreeQueuedChunks(); |
| 1135 bool WaitUntilCompleted(); | 1135 bool WaitUntilCompleted(); |
| 1136 void TearDown(); |
| 1136 | 1137 |
| 1137 private: | 1138 private: |
| 1138 enum ChunkQueueType { | 1139 enum ChunkQueueType { |
| 1139 kRegular, // Pages of kPageSize that do not live in a CodeRange and | 1140 kRegular, // Pages of kPageSize that do not live in a CodeRange and |
| 1140 // can thus be used for stealing. | 1141 // can thus be used for stealing. |
| 1141 kNonRegular, // Large chunks and executable chunks. | 1142 kNonRegular, // Large chunks and executable chunks. |
| 1142 kPooled, // Pooled chunks, already uncommited and ready for reuse. | 1143 kPooled, // Pooled chunks, already uncommited and ready for reuse. |
| 1143 kNumberOfChunkQueues, | 1144 kNumberOfChunkQueues, |
| 1144 }; | 1145 }; |
| 1145 | 1146 |
| (...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2901 PageIterator old_iterator_; | 2902 PageIterator old_iterator_; |
| 2902 PageIterator code_iterator_; | 2903 PageIterator code_iterator_; |
| 2903 PageIterator map_iterator_; | 2904 PageIterator map_iterator_; |
| 2904 LargePageIterator lo_iterator_; | 2905 LargePageIterator lo_iterator_; |
| 2905 }; | 2906 }; |
| 2906 | 2907 |
| 2907 } // namespace internal | 2908 } // namespace internal |
| 2908 } // namespace v8 | 2909 } // namespace v8 |
| 2909 | 2910 |
| 2910 #endif // V8_HEAP_SPACES_H_ | 2911 #endif // V8_HEAP_SPACES_H_ |
| OLD | NEW |