| 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(); |
| 318 bool IsSweepingCompleted(); | 319 bool IsSweepingCompleted(); |
| 319 void SweepOrWaitUntilSweepingCompleted(Page* page); | 320 void SweepOrWaitUntilSweepingCompleted(Page* page); |
| 320 | 321 |
| 321 void AddSweptPageSafe(PagedSpace* space, Page* page); | 322 void AddSweptPageSafe(PagedSpace* space, Page* page); |
| 322 Page* GetSweptPageSafe(PagedSpace* space); | 323 Page* GetSweptPageSafe(PagedSpace* space); |
| 323 | 324 |
| 324 private: | 325 private: |
| 325 static const int kAllocationSpaces = LAST_PAGED_SPACE + 1; | 326 static const int kAllocationSpaces = LAST_PAGED_SPACE + 1; |
| 326 | 327 |
| 327 template <typename Callback> | 328 template <typename Callback> |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 private: | 769 private: |
| 769 MarkCompactCollector* collector_; | 770 MarkCompactCollector* collector_; |
| 770 }; | 771 }; |
| 771 | 772 |
| 772 | 773 |
| 773 const char* AllocationSpaceName(AllocationSpace space); | 774 const char* AllocationSpaceName(AllocationSpace space); |
| 774 } // namespace internal | 775 } // namespace internal |
| 775 } // namespace v8 | 776 } // namespace v8 |
| 776 | 777 |
| 777 #endif // V8_HEAP_MARK_COMPACT_H_ | 778 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |