v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
cppgc::subtle::NoGarbageCollectionScope Class Referencefinal

#include <heap-consistency.h>

Collaboration diagram for cppgc::subtle::NoGarbageCollectionScope:

Public Member Functions

 NoGarbageCollectionScope (HeapHandle &heap_handle)
 
 ~NoGarbageCollectionScope ()
 
 NoGarbageCollectionScope (const NoGarbageCollectionScope &)=delete
 
NoGarbageCollectionScopeoperator= (const NoGarbageCollectionScope &)=delete
 

Static Public Member Functions

static void Enter (HeapHandle &heap_handle)
 
static void Leave (HeapHandle &heap_handle)
 

Private Member Functions

 CPPGC_STACK_ALLOCATED ()
 

Private Attributes

HeapHandleheap_handle_
 

Detailed Description

Avoids invoking garbage collection finalizations. Already running garbage collection phase are unaffected by this scope.

Should only be used temporarily as the scope has an impact on memory usage and follow up garbage collections.

Definition at line 270 of file heap-consistency.h.

Constructor & Destructor Documentation

◆ NoGarbageCollectionScope() [1/2]

cppgc::subtle::NoGarbageCollectionScope::NoGarbageCollectionScope ( cppgc::HeapHandle & heap_handle)
explicit

Constructs a scoped object that automatically enters and leaves a no garbage collection scope based on its lifetime.

Parameters
heap_handleThe corresponding heap.

Definition at line 55 of file heap-consistency.cc.

Here is the call graph for this function:

◆ ~NoGarbageCollectionScope()

cppgc::subtle::NoGarbageCollectionScope::~NoGarbageCollectionScope ( )

Definition at line 61 of file heap-consistency.cc.

Here is the call graph for this function:

◆ NoGarbageCollectionScope() [2/2]

cppgc::subtle::NoGarbageCollectionScope::NoGarbageCollectionScope ( const NoGarbageCollectionScope & )
delete

Member Function Documentation

◆ CPPGC_STACK_ALLOCATED()

cppgc::subtle::NoGarbageCollectionScope::CPPGC_STACK_ALLOCATED ( )
private

◆ Enter()

void cppgc::subtle::NoGarbageCollectionScope::Enter ( cppgc::HeapHandle & heap_handle)
static

Enters a no garbage collection scope. Must be paired with Leave(). Prefer a scope instance of NoGarbageCollectionScope.

Parameters
heap_handleThe corresponding heap.

Definition at line 44 of file heap-consistency.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Leave()

void cppgc::subtle::NoGarbageCollectionScope::Leave ( cppgc::HeapHandle & heap_handle)
static

Leaves a no garbage collection scope. Must be paired with Enter(). Prefer a scope instance of NoGarbageCollectionScope.

Parameters
heap_handleThe corresponding heap.

Definition at line 50 of file heap-consistency.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

NoGarbageCollectionScope & cppgc::subtle::NoGarbageCollectionScope::operator= ( const NoGarbageCollectionScope & )
delete

Member Data Documentation

◆ heap_handle_

HeapHandle& cppgc::subtle::NoGarbageCollectionScope::heap_handle_
private

Definition at line 303 of file heap-consistency.h.


The documentation for this class was generated from the following files: