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_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 void MoveElements(FixedArray* array, int dst_index, int src_index, int len); | 744 void MoveElements(FixedArray* array, int dst_index, int src_index, int len); |
745 | 745 |
746 // Initialize a filler object to keep the ability to iterate over the heap | 746 // Initialize a filler object to keep the ability to iterate over the heap |
747 // when introducing gaps within pages. If slots could have been recorded in | 747 // when introducing gaps within pages. If slots could have been recorded in |
748 // the freed area, then pass ClearRecordedSlots::kYes as the mode. Otherwise, | 748 // the freed area, then pass ClearRecordedSlots::kYes as the mode. Otherwise, |
749 // pass ClearRecordedSlots::kNo. | 749 // pass ClearRecordedSlots::kNo. |
750 void CreateFillerObjectAt(Address addr, int size, ClearRecordedSlots mode); | 750 void CreateFillerObjectAt(Address addr, int size, ClearRecordedSlots mode); |
751 | 751 |
752 bool CanMoveObjectStart(HeapObject* object); | 752 bool CanMoveObjectStart(HeapObject* object); |
753 | 753 |
| 754 static bool IsImmovable(HeapObject* object); |
| 755 |
754 // Maintain consistency of live bytes during incremental marking. | 756 // Maintain consistency of live bytes during incremental marking. |
755 void AdjustLiveBytes(HeapObject* object, int by); | 757 void AdjustLiveBytes(HeapObject* object, int by); |
756 | 758 |
757 // Trim the given array from the left. Note that this relocates the object | 759 // Trim the given array from the left. Note that this relocates the object |
758 // start and hence is only valid if there is only a single reference to it. | 760 // start and hence is only valid if there is only a single reference to it. |
759 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | 761 FixedArrayBase* LeftTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); |
760 | 762 |
761 // Trim the given array from the right. | 763 // Trim the given array from the right. |
762 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); | 764 void RightTrimFixedArray(FixedArrayBase* obj, int elements_to_trim); |
763 | 765 |
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2694 friend class LargeObjectSpace; | 2696 friend class LargeObjectSpace; |
2695 friend class NewSpace; | 2697 friend class NewSpace; |
2696 friend class PagedSpace; | 2698 friend class PagedSpace; |
2697 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2699 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2698 }; | 2700 }; |
2699 | 2701 |
2700 } // namespace internal | 2702 } // namespace internal |
2701 } // namespace v8 | 2703 } // namespace v8 |
2702 | 2704 |
2703 #endif // V8_HEAP_HEAP_H_ | 2705 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |