OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 HEAP_UTILS_H_ | 5 #ifndef HEAP_UTILS_H_ |
6 #define HEAP_UTILS_H_ | 6 #define HEAP_UTILS_H_ |
7 | 7 |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/heap/heap-inl.h" | 9 #include "src/heap/heap-inl.h" |
10 #include "src/heap/incremental-marking.h" | 10 #include "src/heap/incremental-marking.h" |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 while (!marking->IsComplete()) { | 136 while (!marking->IsComplete()) { |
137 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 137 marking->Step(i::MB, i::IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
138 if (marking->IsReadyToOverApproximateWeakClosure()) { | 138 if (marking->IsReadyToOverApproximateWeakClosure()) { |
139 marking->FinalizeIncrementally(); | 139 marking->FinalizeIncrementally(); |
140 } | 140 } |
141 } | 141 } |
142 CHECK(marking->IsComplete()); | 142 CHECK(marking->IsComplete()); |
143 } | 143 } |
144 | 144 |
145 static inline void AbandonCurrentlyFreeMemory(PagedSpace* space) { | |
146 space->EmptyAllocationInfo(); | |
147 PageIterator pit(space); | |
148 while (pit.has_next()) { | |
149 pit.next()->MarkNeverAllocateForTesting(); | |
150 } | |
151 } | |
152 | |
153 } // namespace internal | 145 } // namespace internal |
154 } // namespace v8 | 146 } // namespace v8 |
155 | 147 |
156 #endif // HEAP_UTILS_H_ | 148 #endif // HEAP_UTILS_H_ |
OLD | NEW |