v8
10.1.124 (node 18.2.0)
V8 is Google's open source JavaScript engine
|
#include <v8-cppgc.h>
Public Member Functions | |
virtual | ~CppHeap ()=default |
cppgc::AllocationHandle & | GetAllocationHandle () |
cppgc::HeapHandle & | GetHeapHandle () |
void | Terminate () |
cppgc::HeapStatistics | CollectStatistics (cppgc::HeapStatistics::DetailLevel detail_level) |
void | CollectCustomSpaceStatisticsAtLastGC (std::vector< cppgc::CustomSpaceIndex > custom_spaces, std::unique_ptr< CustomSpaceStatisticsReceiver > receiver) |
void | EnableDetachedGarbageCollectionsForTesting () |
void | CollectGarbageForTesting (cppgc::EmbedderStackState stack_state) |
void | CollectGarbageInYoungGenerationForTesting (cppgc::EmbedderStackState stack_state) |
Static Public Member Functions | |
static std::unique_ptr< CppHeap > | Create (v8::Platform *platform, const CppHeapCreateParams ¶ms) |
Friends | |
class | internal::CppHeap |
A heap for allocating managed C++ objects.
Definition at line 87 of file v8-cppgc.h.
|
virtualdefault |
void CollectCustomSpaceStatisticsAtLastGC | ( | std::vector< cppgc::CustomSpaceIndex > | custom_spaces, |
std::unique_ptr< CustomSpaceStatisticsReceiver > | receiver | ||
) |
Collects statistics for the given spaces and reports them to the receiver.
custom_spaces | a collection of custom space indicies. |
receiver | an object that gets the results. |
void CollectGarbageForTesting | ( | cppgc::EmbedderStackState | stack_state | ) |
Performs a stop-the-world garbage collection for testing purposes.
stack_state | The stack state to assume for the garbage collection. |
void CollectGarbageInYoungGenerationForTesting | ( | cppgc::EmbedderStackState | stack_state | ) |
Performs a stop-the-world minor garbage collection for testing purposes.
stack_state | The stack state to assume for the garbage collection. |
cppgc::HeapStatistics CollectStatistics | ( | cppgc::HeapStatistics::DetailLevel | detail_level | ) |
detail_level | specifies whether should return detailed statistics or only brief summary statistics. |
|
static |
void EnableDetachedGarbageCollectionsForTesting | ( | ) |
Enables a detached mode that allows testing garbage collection using cppgc::testing
APIs. Once used, the heap cannot be attached to an Isolate
anymore.
cppgc::AllocationHandle& GetAllocationHandle | ( | ) |
MakeGarbageCollected()
. cppgc::HeapHandle& GetHeapHandle | ( | ) |
CppHeap
is alive. void Terminate | ( | ) |
Terminate clears all roots and performs multiple garbage collections to reclaim potentially newly created objects in destructors.
After this call, object allocation is prohibited.
|
friend |
Definition at line 158 of file v8-cppgc.h.