| 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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 AllocationSpace to_old_space); | 652 AllocationSpace to_old_space); |
| 653 | 653 |
| 654 bool TryPromoteObject(HeapObject* object, int object_size); | 654 bool TryPromoteObject(HeapObject* object, int object_size); |
| 655 | 655 |
| 656 void InvalidateCode(Code* code); | 656 void InvalidateCode(Code* code); |
| 657 | 657 |
| 658 void ClearMarkbits(); | 658 void ClearMarkbits(); |
| 659 | 659 |
| 660 bool abort_incremental_marking() const { return abort_incremental_marking_; } | 660 bool abort_incremental_marking() const { return abort_incremental_marking_; } |
| 661 | 661 |
| 662 bool finalize_incremental_marking() const { | |
| 663 return finalize_incremental_marking_; | |
| 664 } | |
| 665 | |
| 666 bool is_compacting() const { return compacting_; } | 662 bool is_compacting() const { return compacting_; } |
| 667 | 663 |
| 668 MarkingParity marking_parity() { return marking_parity_; } | 664 MarkingParity marking_parity() { return marking_parity_; } |
| 669 | 665 |
| 670 // Concurrent and parallel sweeping support. If required_freed_bytes was set | 666 // Concurrent and parallel sweeping support. If required_freed_bytes was set |
| 671 // to a value larger than 0, then sweeping returns after a block of at least | 667 // to a value larger than 0, then sweeping returns after a block of at least |
| 672 // required_freed_bytes was freed. If required_freed_bytes was set to zero | 668 // required_freed_bytes was freed. If required_freed_bytes was set to zero |
| 673 // then the whole given space is swept. It returns the size of the maximum | 669 // then the whole given space is swept. It returns the size of the maximum |
| 674 // continuous freed memory chunk. | 670 // continuous freed memory chunk. |
| 675 int SweepInParallel(PagedSpace* space, int required_freed_bytes); | 671 int SweepInParallel(PagedSpace* space, int required_freed_bytes); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 }; | 742 }; |
| 747 | 743 |
| 748 // The current stage of the collector. | 744 // The current stage of the collector. |
| 749 CollectorState state_; | 745 CollectorState state_; |
| 750 #endif | 746 #endif |
| 751 | 747 |
| 752 bool reduce_memory_footprint_; | 748 bool reduce_memory_footprint_; |
| 753 | 749 |
| 754 bool abort_incremental_marking_; | 750 bool abort_incremental_marking_; |
| 755 | 751 |
| 756 bool finalize_incremental_marking_; | |
| 757 | |
| 758 MarkingParity marking_parity_; | 752 MarkingParity marking_parity_; |
| 759 | 753 |
| 760 // True if we are collecting slots to perform evacuation from evacuation | 754 // True if we are collecting slots to perform evacuation from evacuation |
| 761 // candidates. | 755 // candidates. |
| 762 bool compacting_; | 756 bool compacting_; |
| 763 | 757 |
| 764 bool was_marked_incrementally_; | 758 bool was_marked_incrementally_; |
| 765 | 759 |
| 766 // True if concurrent or parallel sweeping is currently in progress. | 760 // True if concurrent or parallel sweeping is currently in progress. |
| 767 bool sweeping_in_progress_; | 761 bool sweeping_in_progress_; |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 private: | 999 private: |
| 1006 MarkCompactCollector* collector_; | 1000 MarkCompactCollector* collector_; |
| 1007 }; | 1001 }; |
| 1008 | 1002 |
| 1009 | 1003 |
| 1010 const char* AllocationSpaceName(AllocationSpace space); | 1004 const char* AllocationSpaceName(AllocationSpace space); |
| 1011 } | 1005 } |
| 1012 } // namespace v8::internal | 1006 } // namespace v8::internal |
| 1013 | 1007 |
| 1014 #endif // V8_HEAP_MARK_COMPACT_H_ | 1008 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |