| 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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 // Special case for processing weak references in a full collection. We need | 697 // Special case for processing weak references in a full collection. We need |
| 698 // to artificially keep AllocationSites alive for a time. | 698 // to artificially keep AllocationSites alive for a time. |
| 699 void MarkAllocationSite(AllocationSite* site); | 699 void MarkAllocationSite(AllocationSite* site); |
| 700 | 700 |
| 701 // Mark objects in implicit references groups if their parent object | 701 // Mark objects in implicit references groups if their parent object |
| 702 // is marked. | 702 // is marked. |
| 703 void MarkImplicitRefGroups(MarkObjectFunction mark_object); | 703 void MarkImplicitRefGroups(MarkObjectFunction mark_object); |
| 704 | 704 |
| 705 MarkingDeque* marking_deque() { return &marking_deque_; } | 705 MarkingDeque* marking_deque() { return &marking_deque_; } |
| 706 | 706 |
| 707 void EnsureMarkingDequeIsCommittedAndInitialize(); | 707 void EnsureMarkingDequeIsCommittedAndInitialize(size_t max_size = 4 * MB); |
| 708 | 708 |
| 709 void InitializeMarkingDeque(); | 709 void InitializeMarkingDeque(); |
| 710 | 710 |
| 711 void UncommitMarkingDeque(); | 711 void UncommitMarkingDeque(); |
| 712 | 712 |
| 713 // The following four methods can just be called after marking, when the | 713 // The following four methods can just be called after marking, when the |
| 714 // whole transitive closure is known. They must be called before sweeping | 714 // whole transitive closure is known. They must be called before sweeping |
| 715 // when mark bits are still intact. | 715 // when mark bits are still intact. |
| 716 bool IsSlotInBlackObject(Page* p, Address slot, HeapObject** out_object); | 716 bool IsSlotInBlackObject(Page* p, Address slot, HeapObject** out_object); |
| 717 bool IsSlotInBlackObjectSlow(Page* p, Address slot); | 717 bool IsSlotInBlackObjectSlow(Page* p, Address slot); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 private: | 1005 private: |
| 1006 MarkCompactCollector* collector_; | 1006 MarkCompactCollector* collector_; |
| 1007 }; | 1007 }; |
| 1008 | 1008 |
| 1009 | 1009 |
| 1010 const char* AllocationSpaceName(AllocationSpace space); | 1010 const char* AllocationSpaceName(AllocationSpace space); |
| 1011 } | 1011 } |
| 1012 } // namespace v8::internal | 1012 } // namespace v8::internal |
| 1013 | 1013 |
| 1014 #endif // V8_HEAP_MARK_COMPACT_H_ | 1014 #endif // V8_HEAP_MARK_COMPACT_H_ |
| OLD | NEW |