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

#include <persistent-node.h>

Inheritance diagram for cppgc::internal::PersistentRegionBase:
Collaboration diagram for cppgc::internal::PersistentRegionBase:

Public Member Functions

 ~PersistentRegionBase ()
 
 PersistentRegionBase (const PersistentRegionBase &)=delete
 
PersistentRegionBaseoperator= (const PersistentRegionBase &)=delete
 
void Iterate (RootVisitor &)
 
size_t NodesInUse () const
 
void ClearAllUsedNodes ()
 

Protected Member Functions

 PersistentRegionBase (const FatalOutOfMemoryHandler &oom_handler)
 
PersistentNodeTryAllocateNodeFromFreeList (void *owner, TraceRootCallback trace)
 
void FreeNode (PersistentNode *node)
 
PersistentNodeRefillFreeListAndAllocateNode (void *owner, TraceRootCallback trace)
 

Private Types

using PersistentNodeSlots = std::array<PersistentNode, 256u>
 

Private Member Functions

template<typename PersistentBaseClass >
void ClearAllUsedNodes ()
 
void RefillFreeList ()
 

Private Attributes

std::vector< std::unique_ptr< PersistentNodeSlots > > nodes_
 
PersistentNodefree_list_head_ = nullptr
 
size_t nodes_in_use_ = 0
 
const FatalOutOfMemoryHandleroom_handler_
 

Friends

class CrossThreadPersistentRegion
 

Detailed Description

Definition at line 78 of file persistent-node.h.

Member Typedef Documentation

◆ PersistentNodeSlots

Definition at line 79 of file persistent-node.h.

Constructor & Destructor Documentation

◆ ~PersistentRegionBase()

cppgc::internal::PersistentRegionBase::~PersistentRegionBase ( )

Definition at line 24 of file persistent-node.cc.

Here is the call graph for this function:

◆ PersistentRegionBase() [1/2]

cppgc::internal::PersistentRegionBase::PersistentRegionBase ( const PersistentRegionBase & )
delete

◆ PersistentRegionBase() [2/2]

cppgc::internal::PersistentRegionBase::PersistentRegionBase ( const FatalOutOfMemoryHandler & oom_handler)
explicitprotected

Definition at line 20 of file persistent-node.cc.

Member Function Documentation

◆ ClearAllUsedNodes() [1/2]

void cppgc::internal::PersistentRegionBase::ClearAllUsedNodes ( )

Definition at line 49 of file persistent-node.cc.

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

◆ ClearAllUsedNodes() [2/2]

template<typename PersistentBaseClass >
void cppgc::internal::PersistentRegionBase::ClearAllUsedNodes ( )
private

Definition at line 27 of file persistent-node.cc.

◆ FreeNode()

void cppgc::internal::PersistentRegionBase::FreeNode ( PersistentNode * node)
inlineprotected

Definition at line 110 of file persistent-node.h.

◆ Iterate()

void cppgc::internal::PersistentRegionBase::Iterate ( RootVisitor & root_visitor)

Definition at line 87 of file persistent-node.cc.

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

◆ NodesInUse()

size_t cppgc::internal::PersistentRegionBase::NodesInUse ( ) const

Definition at line 53 of file persistent-node.cc.

Here is the caller graph for this function:

◆ operator=()

PersistentRegionBase & cppgc::internal::PersistentRegionBase::operator= ( const PersistentRegionBase & )
delete

◆ RefillFreeList()

void cppgc::internal::PersistentRegionBase::RefillFreeList ( )
private

Definition at line 67 of file persistent-node.cc.

◆ RefillFreeListAndAllocateNode()

PersistentNode * cppgc::internal::PersistentRegionBase::RefillFreeListAndAllocateNode ( void * owner,
TraceRootCallback trace )
protected

Definition at line 79 of file persistent-node.cc.

◆ TryAllocateNodeFromFreeList()

PersistentNode * cppgc::internal::PersistentRegionBase::TryAllocateNodeFromFreeList ( void * owner,
TraceRootCallback trace )
inlineprotected

Definition at line 97 of file persistent-node.h.

Friends And Related Symbol Documentation

◆ CrossThreadPersistentRegion

friend class CrossThreadPersistentRegion
friend

Definition at line 133 of file persistent-node.h.

Member Data Documentation

◆ free_list_head_

PersistentNode* cppgc::internal::PersistentRegionBase::free_list_head_ = nullptr
private

Definition at line 129 of file persistent-node.h.

◆ nodes_

std::vector<std::unique_ptr<PersistentNodeSlots> > cppgc::internal::PersistentRegionBase::nodes_
private

Definition at line 128 of file persistent-node.h.

◆ nodes_in_use_

size_t cppgc::internal::PersistentRegionBase::nodes_in_use_ = 0
private

Definition at line 130 of file persistent-node.h.

◆ oom_handler_

const FatalOutOfMemoryHandler& cppgc::internal::PersistentRegionBase::oom_handler_
private

Definition at line 131 of file persistent-node.h.


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