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

#include <caged-heap.h>

Collaboration diagram for cppgc::internal::CagedHeap:

Public Types

using AllocatorType = v8::base::BoundedPageAllocator
 

Public Member Functions

 CagedHeap (const CagedHeap &)=delete
 
CagedHeapoperator= (const CagedHeap &)=delete
 
AllocatorTypepage_allocator ()
 
const AllocatorTypepage_allocator () const
 
bool IsOnHeap (const void *address) const
 
void * base () const
 

Static Public Member Functions

template<typename RetType = uintptr_t>
static RetType OffsetFromAddress (const void *address)
 
static uintptr_t BaseFromAddress (const void *address)
 
static void InitializeIfNeeded (PageAllocator &platform_allocator, size_t desired_heap_size)
 
static void CommitAgeTable (PageAllocator &platform_allocator)
 
static CagedHeapInstance ()
 

Private Member Functions

 CagedHeap (PageAllocator &platform_allocator, size_t desired_heap_size)
 

Private Attributes

const VirtualMemory reserved_area_
 
std::unique_ptr< AllocatorTypepage_bounded_allocator_
 

Static Private Attributes

static CagedHeapinstance_ = nullptr
 

Friends

class v8::base::LeakyObject< CagedHeap >
 
class testing::TestWithHeap
 

Detailed Description

Definition at line 25 of file caged-heap.h.

Member Typedef Documentation

◆ AllocatorType

Constructor & Destructor Documentation

◆ CagedHeap() [1/2]

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

◆ CagedHeap() [2/2]

cppgc::internal::CagedHeap::CagedHeap ( PageAllocator & platform_allocator,
size_t desired_heap_size )
explicitprivate

defined(CPPGC_POINTER_COMPRESSION)

Definition at line 98 of file caged-heap.cc.

Here is the call graph for this function:

Member Function Documentation

◆ base()

void * cppgc::internal::CagedHeap::base ( ) const
inline

Definition at line 65 of file caged-heap.h.

◆ BaseFromAddress()

static uintptr_t cppgc::internal::CagedHeap::BaseFromAddress ( const void * address)
inlinestatic

Definition at line 38 of file caged-heap.h.

◆ CommitAgeTable()

void cppgc::internal::CagedHeap::CommitAgeTable ( PageAllocator & platform_allocator)
static

Definition at line 146 of file caged-heap.cc.

Here is the call graph for this function:

◆ InitializeIfNeeded()

void cppgc::internal::CagedHeap::InitializeIfNeeded ( PageAllocator & platform_allocator,
size_t desired_heap_size )
static

Definition at line 86 of file caged-heap.cc.

Here is the caller graph for this function:

◆ Instance()

CagedHeap & cppgc::internal::CagedHeap::Instance ( )
static

Definition at line 93 of file caged-heap.cc.

Here is the caller graph for this function:

◆ IsOnHeap()

bool cppgc::internal::CagedHeap::IsOnHeap ( const void * address) const
inline

Definition at line 58 of file caged-heap.h.

◆ OffsetFromAddress()

template<typename RetType = uintptr_t>
static RetType cppgc::internal::CagedHeap::OffsetFromAddress ( const void * address)
inlinestatic

Definition at line 30 of file caged-heap.h.

◆ operator=()

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

◆ page_allocator() [1/2]

AllocatorType & cppgc::internal::CagedHeap::page_allocator ( )
inline

Definition at line 53 of file caged-heap.h.

Here is the caller graph for this function:

◆ page_allocator() [2/2]

const AllocatorType & cppgc::internal::CagedHeap::page_allocator ( ) const
inline

Definition at line 54 of file caged-heap.h.

Friends And Related Symbol Documentation

◆ testing::TestWithHeap

friend class testing::TestWithHeap
friend

Definition at line 69 of file caged-heap.h.

◆ v8::base::LeakyObject< CagedHeap >

friend class v8::base::LeakyObject< CagedHeap >
friend

Definition at line 65 of file caged-heap.h.

Member Data Documentation

◆ instance_

CagedHeap * cppgc::internal::CagedHeap::instance_ = nullptr
staticprivate

Definition at line 74 of file caged-heap.h.

◆ page_bounded_allocator_

std::unique_ptr<AllocatorType> cppgc::internal::CagedHeap::page_bounded_allocator_
private

Definition at line 79 of file caged-heap.h.

◆ reserved_area_

const VirtualMemory cppgc::internal::CagedHeap::reserved_area_
private

Definition at line 76 of file caged-heap.h.


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