| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 | 460 |
| 461 void PrepareToBeSweptPage(AllocationSpace space, Page* page); | 461 void PrepareToBeSweptPage(AllocationSpace space, Page* page); |
| 462 | 462 |
| 463 Heap* heap_; | 463 Heap* heap_; |
| 464 base::Semaphore pending_sweeper_tasks_semaphore_; | 464 base::Semaphore pending_sweeper_tasks_semaphore_; |
| 465 base::Mutex mutex_; | 465 base::Mutex mutex_; |
| 466 SweptList swept_list_[kAllocationSpaces]; | 466 SweptList swept_list_[kAllocationSpaces]; |
| 467 SweepingList sweeping_list_[kAllocationSpaces]; | 467 SweepingList sweeping_list_[kAllocationSpaces]; |
| 468 bool sweeping_in_progress_; | 468 bool sweeping_in_progress_; |
| 469 bool late_pages_; | 469 bool late_pages_; |
| 470 int num_sweeping_tasks_; | 470 base::AtomicNumber<intptr_t> num_sweeping_tasks_; |
| 471 }; | 471 }; |
| 472 | 472 |
| 473 enum IterationMode { | 473 enum IterationMode { |
| 474 kKeepMarking, | 474 kKeepMarking, |
| 475 kClearMarkbits, | 475 kClearMarkbits, |
| 476 }; | 476 }; |
| 477 | 477 |
| 478 static void Initialize(); | 478 static void Initialize(); |
| 479 | 479 |
| 480 void SetUp(); | 480 void SetUp(); |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 private: | 890 private: |
| 891 MarkCompactCollector* collector_; | 891 MarkCompactCollector* collector_; |
| 892 }; | 892 }; |
| 893 | 893 |
| 894 | 894 |
| 895 const char* AllocationSpaceName(AllocationSpace space); | 895 const char* AllocationSpaceName(AllocationSpace space); |
| 896 } // namespace internal | 896 } // namespace internal |
| 897 } // namespace v8 | 897 } // namespace v8 |
| 898 | 898 |
| 899 #endif // V8_HEAP_MARK_COMPACT_H_ | 899 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |