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

#include <heap-page.h>

Inheritance diagram for cppgc::internal::BasePage:
Collaboration diagram for cppgc::internal::BasePage:

Classes

struct  SlotSetDeleter
 

Public Member Functions

 BasePage (const BasePage &)=delete
 
BasePageoperator= (const BasePage &)=delete
 
HeapBaseheap () const
 
BaseSpacespace () const
 
bool is_large () const
 
Address PayloadStart ()
 
ConstAddress PayloadStart () const
 
Address PayloadEnd ()
 
ConstAddress PayloadEnd () const
 
size_t AllocatedSize () const
 
size_t AllocatedBytesAtLastGC () const
 
template<AccessMode = AccessMode::kNonAtomic>
HeapObjectHeaderObjectHeaderFromInnerAddress (void *address) const
 
template<AccessMode = AccessMode::kNonAtomic>
const HeapObjectHeaderObjectHeaderFromInnerAddress (const void *address) const
 
HeapObjectHeaderTryObjectHeaderFromInnerAddress (void *address) const
 
const HeapObjectHeaderTryObjectHeaderFromInnerAddress (const void *address) const
 
void SynchronizedLoad () const
 
void SynchronizedStore ()
 
void IncrementDiscardedMemory (size_t value)
 
void ResetDiscardedMemory ()
 
size_t discarded_memory () const
 
void IncrementMarkedBytes (size_t value)
 
void DecrementMarkedBytes (size_t value)
 
void ResetMarkedBytes (size_t new_value=0)
 
size_t marked_bytes () const
 
bool contains_young_objects () const
 
void set_as_containing_young_objects (bool value)
 
void ChangeOwner (BaseSpace &)
 
- Public Member Functions inherited from cppgc::internal::BasePageHandle
HeapHandleheap_handle ()
 
const HeapHandleheap_handle () const
 

Static Public Member Functions

static BasePageFromPayload (void *)
 
static const BasePageFromPayload (const void *)
 
static BasePageFromInnerAddress (const HeapBase *, void *)
 
static const BasePageFromInnerAddress (const HeapBase *, const void *)
 
static void Destroy (BasePage *)
 
- Static Public Member Functions inherited from cppgc::internal::BasePageHandle
static V8_INLINE BasePageHandleFromPayload (void *payload)
 
static V8_INLINE const BasePageHandleFromPayload (const void *payload)
 

Protected Types

enum class  PageType : uint8_t { kNormal , kLarge }
 

Protected Member Functions

 BasePage (HeapBase &, BaseSpace &, PageType)
 
- Protected Member Functions inherited from cppgc::internal::BasePageHandle
 BasePageHandle (HeapHandle &heap_handle)
 

Private Member Functions

void AllocateSlotSet ()
 

Private Attributes

BaseSpacespace_
 
PageType type_
 
bool contains_young_objects_ = false
 
size_t discarded_memory_ = 0
 
std::atomic< size_t > marked_bytes_ {0}
 

Additional Inherited Members

- Protected Attributes inherited from cppgc::internal::BasePageHandle
HeapHandleheap_handle_
 

Detailed Description

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

Member Enumeration Documentation

◆ PageType

enum class cppgc::internal::BasePage::PageType : uint8_t
strongprotected
Enumerator
kNormal 
kLarge 

Definition at line 132 of file heap-page.h.

Constructor & Destructor Documentation

◆ BasePage() [1/2]

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

◆ BasePage() [2/2]

cppgc::internal::BasePage::BasePage ( HeapBase & heap,
BaseSpace & space,
PageType type )
protected

Definition at line 145 of file heap-page.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AllocatedBytesAtLastGC()

size_t cppgc::internal::BasePage::AllocatedBytesAtLastGC ( ) const

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

Here is the call graph for this function:

◆ AllocatedSize()

size_t cppgc::internal::BasePage::AllocatedSize ( ) const

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

Here is the call graph for this function:

◆ AllocateSlotSet()

void cppgc::internal::BasePage::AllocateSlotSet ( )
private

◆ ChangeOwner()

void cppgc::internal::BasePage::ChangeOwner ( BaseSpace & space)

Definition at line 158 of file heap-page.cc.

Here is the call graph for this function:

◆ contains_young_objects()

bool cppgc::internal::BasePage::contains_young_objects ( ) const
inline

Definition at line 118 of file heap-page.h.

◆ DecrementMarkedBytes()

void cppgc::internal::BasePage::DecrementMarkedBytes ( size_t value)
inline

Definition at line 105 of file heap-page.h.

Here is the caller graph for this function:

◆ Destroy()

void cppgc::internal::BasePage::Destroy ( BasePage * page)
static

Definition at line 53 of file heap-page.cc.

Here is the call graph for this function:

◆ discarded_memory()

size_t cppgc::internal::BasePage::discarded_memory ( ) const
inline

Definition at line 97 of file heap-page.h.

◆ FromInnerAddress() [1/2]

const BasePage * cppgc::internal::BasePage::FromInnerAddress ( const HeapBase * heap,
const void * address )
static

Definition at line 46 of file heap-page.cc.

◆ FromInnerAddress() [2/2]

BasePage * cppgc::internal::BasePage::FromInnerAddress ( const HeapBase * heap,
void * address )
static

Definition at line 40 of file heap-page.cc.

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

◆ FromPayload() [1/2]

const BasePage * cppgc::internal::BasePage::FromPayload ( const void * payload)
inlinestatic

Definition at line 319 of file heap-page.h.

Here is the call graph for this function:

◆ FromPayload() [2/2]

BasePage * cppgc::internal::BasePage::FromPayload ( void * payload)
inlinestatic

Definition at line 314 of file heap-page.h.

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

◆ heap()

HeapBase & cppgc::internal::BasePage::heap ( ) const

Definition at line 35 of file heap-page.cc.

Here is the caller graph for this function:

◆ IncrementDiscardedMemory()

void cppgc::internal::BasePage::IncrementDiscardedMemory ( size_t value)
inline

Definition at line 92 of file heap-page.h.

◆ IncrementMarkedBytes()

void cppgc::internal::BasePage::IncrementMarkedBytes ( size_t value)
inline

Definition at line 99 of file heap-page.h.

◆ is_large()

bool cppgc::internal::BasePage::is_large ( ) const
inline

Definition at line 47 of file heap-page.h.

Here is the caller graph for this function:

◆ marked_bytes()

size_t cppgc::internal::BasePage::marked_bytes ( ) const
inline

Definition at line 114 of file heap-page.h.

◆ ObjectHeaderFromInnerAddress() [1/2]

template<AccessMode mode>
const HeapObjectHeader & cppgc::internal::BasePage::ObjectHeaderFromInnerAddress ( const void * address) const

Definition at line 345 of file heap-page.h.

Here is the call graph for this function:

◆ ObjectHeaderFromInnerAddress() [2/2]

template<AccessMode mode>
HeapObjectHeader & cppgc::internal::BasePage::ObjectHeaderFromInnerAddress ( void * address) const

Definition at line 339 of file heap-page.h.

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

◆ operator=()

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

◆ PayloadEnd() [1/2]

Address cppgc::internal::BasePage::PayloadEnd ( )

Definition at line 77 of file heap-page.cc.

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

◆ PayloadEnd() [2/2]

ConstAddress cppgc::internal::BasePage::PayloadEnd ( ) const

Definition at line 82 of file heap-page.cc.

Here is the call graph for this function:

◆ PayloadStart() [1/2]

Address cppgc::internal::BasePage::PayloadStart ( )

Definition at line 68 of file heap-page.cc.

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

◆ PayloadStart() [2/2]

ConstAddress cppgc::internal::BasePage::PayloadStart ( ) const

Definition at line 73 of file heap-page.cc.

Here is the call graph for this function:

◆ ResetDiscardedMemory()

void cppgc::internal::BasePage::ResetDiscardedMemory ( )
inline

Definition at line 96 of file heap-page.h.

◆ ResetMarkedBytes()

void cppgc::internal::BasePage::ResetMarkedBytes ( size_t new_value = 0)
inline

Definition at line 111 of file heap-page.h.

◆ set_as_containing_young_objects()

void cppgc::internal::BasePage::set_as_containing_young_objects ( bool value)
inline

Definition at line 119 of file heap-page.h.

◆ space()

BaseSpace & cppgc::internal::BasePage::space ( ) const
inline

Definition at line 45 of file heap-page.h.

Here is the caller graph for this function:

◆ SynchronizedLoad()

void cppgc::internal::BasePage::SynchronizedLoad ( ) const
inline

Definition at line 80 of file heap-page.h.

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

◆ SynchronizedStore()

void cppgc::internal::BasePage::SynchronizedStore ( )
inline

Definition at line 85 of file heap-page.h.

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

◆ TryObjectHeaderFromInnerAddress() [1/2]

const HeapObjectHeader * cppgc::internal::BasePage::TryObjectHeaderFromInnerAddress ( const void * address) const

Definition at line 104 of file heap-page.cc.

Here is the call graph for this function:

◆ TryObjectHeaderFromInnerAddress() [2/2]

HeapObjectHeader * cppgc::internal::BasePage::TryObjectHeaderFromInnerAddress ( void * address) const

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

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

Member Data Documentation

◆ contains_young_objects_

bool cppgc::internal::BasePage::contains_young_objects_ = false
private

Definition at line 144 of file heap-page.h.

◆ discarded_memory_

size_t cppgc::internal::BasePage::discarded_memory_ = 0
private

Definition at line 148 of file heap-page.h.

◆ marked_bytes_

std::atomic<size_t> cppgc::internal::BasePage::marked_bytes_ {0}
private

Definition at line 149 of file heap-page.h.

◆ space_

BaseSpace* cppgc::internal::BasePage::space_
private

Definition at line 142 of file heap-page.h.

◆ type_

PageType cppgc::internal::BasePage::type_
private

Definition at line 143 of file heap-page.h.


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