v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
heap.h
Go to the documentation of this file.
1// Copyright 2020 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef INCLUDE_CPPGC_HEAP_H_
6#define INCLUDE_CPPGC_HEAP_H_
7
8#include <cstddef>
9#include <cstdint>
10#include <memory>
11#include <vector>
12
13#include "cppgc/common.h"
14#include "cppgc/custom-space.h"
15#include "cppgc/platform.h"
16#include "v8config.h" // NOLINT(build/include_directory)
17
21namespace cppgc {
22
23class AllocationHandle;
24class HeapHandle;
25
31namespace internal {
32class Heap;
33} // namespace internal
34
36 public:
41
56
76
96
109
155
163 static std::unique_ptr<Heap> Create(
164 std::shared_ptr<Platform> platform,
166
167 virtual ~Heap() = default;
168
179 const char* source, const char* reason,
180 StackState stack_state = StackState::kMayContainHeapPointers);
181
186 AllocationHandle& GetAllocationHandle();
187
193
194 private:
195 Heap() = default;
196
197 friend class internal::Heap;
198};
199
200} // namespace cppgc
201
202#endif // INCLUDE_CPPGC_HEAP_H_
HeapHandle & GetHeapHandle()
friend class internal::Heap
Definition heap.h:197
MarkingType
Definition heap.h:60
StackSupport
Definition heap.h:45
AllocationHandle & GetAllocationHandle()
static std::unique_ptr< Heap > Create(std::shared_ptr< Platform > platform, HeapOptions options=HeapOptions::Default())
void ForceGarbageCollectionSlow(const char *source, const char *reason, StackState stack_state=StackState::kMayContainHeapPointers)
virtual ~Heap()=default
SweepingType
Definition heap.h:80
EmbedderStackState StackState
Definition heap.h:40
EmbedderStackState
Definition common.h:15
std::vector< std::unique_ptr< CustomSpaceBase > > custom_spaces
Definition heap.h:127
static HeapOptions Default()
Definition heap.h:120
StackSupport stack_support
Definition heap.h:137
MarkingType marking_support
Definition heap.h:142
ResourceConstraints resource_constraints
Definition heap.h:153
SweepingType sweeping_support
Definition heap.h:147
#define V8_EXPORT
Definition v8config.h:800