Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sweeper.h « cppgc « heap « src « v8 « deps - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3e387731686e963da47d7ea2b7af910a4c3aceaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_HEAP_CPPGC_SWEEPER_H_
#define V8_HEAP_CPPGC_SWEEPER_H_

#include <memory>

#include "src/base/macros.h"

namespace cppgc {
namespace internal {

class RawHeap;

class V8_EXPORT_PRIVATE Sweeper final {
 public:
  enum class Config { kAtomic, kIncrementalAndConcurrent };

  explicit Sweeper(RawHeap*);
  ~Sweeper();

  Sweeper(const Sweeper&) = delete;
  Sweeper& operator=(const Sweeper&) = delete;

  void Start(Config);
  void Finish();

 private:
  class SweeperImpl;
  std::unique_ptr<SweeperImpl> impl_;
};

}  // namespace internal
}  // namespace cppgc

#endif  // V8_HEAP_CPPGC_SWEEPER_H_