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 // Mark objects in implicit references groups if their parent object | 460 // Mark objects in implicit references groups if their parent object |
461 // is marked. | 461 // is marked. |
462 void MarkImplicitRefGroups(MarkObjectFunction mark_object); | 462 void MarkImplicitRefGroups(MarkObjectFunction mark_object); |
463 | 463 |
464 MarkingDeque* marking_deque() { return &marking_deque_; } | 464 MarkingDeque* marking_deque() { return &marking_deque_; } |
465 | 465 |
466 static const size_t kMaxMarkingDequeSize = 4 * MB; | 466 static const size_t kMaxMarkingDequeSize = 4 * MB; |
467 static const size_t kMinMarkingDequeSize = 256 * KB; | 467 static const size_t kMinMarkingDequeSize = 256 * KB; |
468 | 468 |
469 void EnsureMarkingDequeIsCommittedAndInitialize(size_t max_size) { | 469 void EnsureMarkingDequeIsCommittedAndInitialize(size_t max_size) { |
470 if (!marking_deque_.in_use()) { | 470 if (!marking_deque()->in_use()) { |
471 EnsureMarkingDequeIsCommitted(max_size); | 471 EnsureMarkingDequeIsCommitted(max_size); |
472 InitializeMarkingDeque(); | 472 InitializeMarkingDeque(); |
473 } | 473 } |
474 } | 474 } |
475 | 475 |
476 void EnsureMarkingDequeIsCommitted(size_t max_size); | 476 void EnsureMarkingDequeIsCommitted(size_t max_size); |
477 void EnsureMarkingDequeIsReserved(); | 477 void EnsureMarkingDequeIsReserved(); |
478 | 478 |
479 void InitializeMarkingDeque(); | 479 void InitializeMarkingDeque(); |
480 | 480 |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 | 753 |
754 private: | 754 private: |
755 MarkCompactCollector* collector_; | 755 MarkCompactCollector* collector_; |
756 }; | 756 }; |
757 | 757 |
758 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); | 758 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); |
759 } // namespace internal | 759 } // namespace internal |
760 } // namespace v8 | 760 } // namespace v8 |
761 | 761 |
762 #endif // V8_HEAP_MARK_COMPACT_H_ | 762 #endif // V8_HEAP_MARK_COMPACT_H_ |
OLD | NEW |