| 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 "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/heap/spaces.h" | 9 #include "src/heap/spaces.h" |
| 10 | 10 |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 void EnsureSweepingCompleted(); | 460 void EnsureSweepingCompleted(); |
| 461 | 461 |
| 462 void SweepOrWaitUntilSweepingCompleted(Page* page); | 462 void SweepOrWaitUntilSweepingCompleted(Page* page); |
| 463 | 463 |
| 464 // If sweeper threads are not active this method will return true. If | 464 // If sweeper threads are not active this method will return true. If |
| 465 // this is a latency issue we should be smarter here. Otherwise, it will | 465 // this is a latency issue we should be smarter here. Otherwise, it will |
| 466 // return true if the sweeper threads are done processing the pages. | 466 // return true if the sweeper threads are done processing the pages. |
| 467 bool IsSweepingCompleted(); | 467 bool IsSweepingCompleted(); |
| 468 | 468 |
| 469 void RefillFreeList(PagedSpace* space); | 469 void RefillFreeList(PagedSpace* space); |
| 470 void RefillFreeList(CompactionSpace* space); |
| 470 | 471 |
| 471 // Checks if sweeping is in progress right now on any space. | 472 // Checks if sweeping is in progress right now on any space. |
| 472 bool sweeping_in_progress() { return sweeping_in_progress_; } | 473 bool sweeping_in_progress() { return sweeping_in_progress_; } |
| 473 | 474 |
| 474 void set_evacuation(bool evacuation) { evacuation_ = evacuation; } | 475 void set_evacuation(bool evacuation) { evacuation_ = evacuation; } |
| 475 | 476 |
| 476 bool evacuation() const { return evacuation_; } | 477 bool evacuation() const { return evacuation_; } |
| 477 | 478 |
| 478 // Special case for processing weak references in a full collection. We need | 479 // Special case for processing weak references in a full collection. We need |
| 479 // to artificially keep AllocationSites alive for a time. | 480 // to artificially keep AllocationSites alive for a time. |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 private: | 848 private: |
| 848 MarkCompactCollector* collector_; | 849 MarkCompactCollector* collector_; |
| 849 }; | 850 }; |
| 850 | 851 |
| 851 | 852 |
| 852 const char* AllocationSpaceName(AllocationSpace space); | 853 const char* AllocationSpaceName(AllocationSpace space); |
| 853 } // namespace internal | 854 } // namespace internal |
| 854 } // namespace v8 | 855 } // namespace v8 |
| 855 | 856 |
| 856 #endif // V8_HEAP_MARK_COMPACT_H_ | 857 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |