Flutter Engine
The Flutter Engine
incremental_compactor.h
Go to the documentation of this file.
1// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_VM_HEAP_INCREMENTAL_COMPACTOR_H_
6#define RUNTIME_VM_HEAP_INCREMENTAL_COMPACTOR_H_
7
8#include "vm/allocation.h"
9
10namespace dart {
11
12// Forward declarations.
13class PageSpace;
14class ObjectVisitor;
15class IncrementalForwardingVisitor;
16
17// An evacuating compactor that is incremental in the sense that building the
18// remembered set is interleaved with the mutator. The evacuation and forwarding
19// is not interleaved with the mutator, which would require a read barrier.
21 public:
22 static void Prologue(PageSpace* old_space);
23 static bool Epilogue(PageSpace* old_space);
24 static void Abort(PageSpace* old_space);
25
26 private:
27 static bool SelectEvacuationCandidates(PageSpace* old_space);
28 static void CheckFreeLists(PageSpace* old_space);
29
30 static bool HasEvacuationCandidates(PageSpace* old_space);
31 static void CheckPreEvacuate(PageSpace* old_space);
32 static void Evacuate(PageSpace* old_space);
33 static void CheckPostEvacuate(PageSpace* old_space);
34 static void FreeEvacuatedPages(PageSpace* old_space);
35 static void VerifyAfterIncrementalCompaction(PageSpace* old_space);
36};
37
38} // namespace dart
39
40#endif // RUNTIME_VM_HEAP_INCREMENTAL_COMPACTOR_H_
static void Prologue(PageSpace *old_space)
static void Abort(PageSpace *old_space)
static bool Epilogue(PageSpace *old_space)
Definition: dart_vm.cc:33