Chromium Code Reviews| Index: test/cctest/heap/utils-inl.h |
| diff --git a/test/cctest/heap/utils-inl.h b/test/cctest/heap/utils-inl.h |
| index 0e943b4197538bccb7bd79c14c0bcd352a512177..e389c1485f9112e2a513cd31756546b0c5c07638 100644 |
| --- a/test/cctest/heap/utils-inl.h |
| +++ b/test/cctest/heap/utils-inl.h |
| @@ -142,6 +142,21 @@ static inline void SimulateIncrementalMarking(i::Heap* heap, |
| CHECK(marking->IsComplete()); |
| } |
| +static inline void AbandonCurrentlyFreeMemory(PagedSpace* space) { |
| + space->EmptyAllocationInfo(); |
| + PageIterator pit(space); |
| + while (pit.has_next()) { |
| + pit.next()->MarkNeverAllocateForTesting(); |
| + } |
| +} |
| + |
| +static inline void GcAndSweep(Heap* heap, AllocationSpace space) { |
|
Hannes Payer (out of office)
2016/05/11 11:12:34
Why don't we make it a CollectGarbage mode that fi
Michael Lippautz
2016/05/11 18:43:26
Good idea! Fine to do it in a follow up? It requir
|
| + heap->CollectGarbage(space); |
| + if (heap->mark_compact_collector()->sweeping_in_progress()) { |
| + heap->mark_compact_collector()->EnsureSweepingCompleted(); |
| + } |
| +} |
| + |
| } // namespace internal |
| } // namespace v8 |