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_MARK_COMPACT_H_ | 5 #ifndef V8_HEAP_MARK_COMPACT_H_ |
6 #define V8_HEAP_MARK_COMPACT_H_ | 6 #define V8_HEAP_MARK_COMPACT_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 void AddPage(AllocationSpace space, Page* page); | 308 void AddPage(AllocationSpace space, Page* page); |
309 void AddLatePage(AllocationSpace space, Page* page); | 309 void AddLatePage(AllocationSpace space, Page* page); |
310 | 310 |
311 int ParallelSweepSpace(AllocationSpace identity, int required_freed_bytes, | 311 int ParallelSweepSpace(AllocationSpace identity, int required_freed_bytes, |
312 int max_pages = 0); | 312 int max_pages = 0); |
313 int ParallelSweepPage(Page* page, AllocationSpace identity); | 313 int ParallelSweepPage(Page* page, AllocationSpace identity); |
314 | 314 |
315 void StartSweeping(); | 315 void StartSweeping(); |
316 void StartSweepingHelper(AllocationSpace space_to_start); | 316 void StartSweepingHelper(AllocationSpace space_to_start); |
317 void EnsureCompleted(); | 317 void EnsureCompleted(); |
318 void EnsureNewSpaceCompleted(); | |
319 bool IsSweepingCompleted(); | 318 bool IsSweepingCompleted(); |
320 void SweepOrWaitUntilSweepingCompleted(Page* page); | 319 void SweepOrWaitUntilSweepingCompleted(Page* page); |
321 | 320 |
322 void AddSweptPageSafe(PagedSpace* space, Page* page); | 321 void AddSweptPageSafe(PagedSpace* space, Page* page); |
323 Page* GetSweptPageSafe(PagedSpace* space); | 322 Page* GetSweptPageSafe(PagedSpace* space); |
324 | 323 |
325 private: | 324 private: |
326 static const int kAllocationSpaces = LAST_PAGED_SPACE + 1; | 325 static const int kAllocationSpaces = LAST_PAGED_SPACE + 1; |
327 | 326 |
328 template <typename Callback> | 327 template <typename Callback> |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 private: | 768 private: |
770 MarkCompactCollector* collector_; | 769 MarkCompactCollector* collector_; |
771 }; | 770 }; |
772 | 771 |
773 | 772 |
774 const char* AllocationSpaceName(AllocationSpace space); | 773 const char* AllocationSpaceName(AllocationSpace space); |
775 } // namespace internal | 774 } // namespace internal |
776 } // namespace v8 | 775 } // namespace v8 |
777 | 776 |
778 #endif // V8_HEAP_MARK_COMPACT_H_ | 777 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |