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

#include <memory-chunk-metadata.h>

Inheritance diagram for v8::internal::MemoryChunkMetadata:
Collaboration diagram for v8::internal::MemoryChunkMetadata:

Public Member Functions

 MemoryChunkMetadata (Heap *heap, BaseSpace *space, size_t chunk_size, Address area_start, Address area_end, VirtualMemory reservation)
 
 ~MemoryChunkMetadata ()
 
Address ChunkAddress () const
 
Address MetadataAddress () const
 
size_t Offset (Address a) const
 
size_t size () const
 
void set_size (size_t size)
 
Address area_start () const
 
Address area_end () const
 
void set_area_end (Address area_end)
 
size_t area_size () const
 
Heapheap () const
 
BaseSpaceowner () const
 
void set_owner (BaseSpace *space)
 
bool InSharedSpace () const
 
bool InTrustedSpace () const
 
bool IsWritable () const
 
bool IsMutablePageMetadata () const
 
bool Contains (Address addr) const
 
bool ContainsLimit (Address addr) const
 
size_t wasted_memory () const
 
void add_wasted_memory (size_t waste)
 
size_t allocated_bytes () const
 
Address HighWaterMark () const
 
VirtualMemoryreserved_memory ()
 
void ResetAllocationStatistics ()
 
void IncreaseAllocatedBytes (size_t bytes)
 
void DecreaseAllocatedBytes (size_t bytes)
 
MemoryChunkChunk ()
 
const MemoryChunkChunk () const
 

Static Public Member Functions

static V8_INLINE MemoryChunkMetadataFromAddress (Address a)
 
static V8_INLINE MemoryChunkMetadataFromHeapObject (Tagged< HeapObject > o)
 
static V8_INLINE MemoryChunkMetadataFromHeapObject (const HeapObjectLayout *o)
 
static V8_INLINE void UpdateHighWaterMark (Address mark)
 

Protected Attributes

VirtualMemory reservation_
 
size_t allocated_bytes_
 
size_t wasted_memory_ = 0
 
std::atomic< intptr_t > high_water_mark_
 
size_t size_
 
Address area_end_
 
Heapheap_
 
Address area_start_
 
std::atomic< BaseSpace * > owner_
 

Static Private Member Functions

static constexpr intptr_t HeapOffset ()
 
static constexpr intptr_t AreaStartOffset ()
 

Friends

class debug_helper_internal::ReadStringVisitor
 
class CodeStubAssembler
 
class MacroAssembler
 

Detailed Description

Definition at line 32 of file memory-chunk-metadata.h.

Constructor & Destructor Documentation

◆ MemoryChunkMetadata()

v8::internal::MemoryChunkMetadata::MemoryChunkMetadata ( Heap * heap,
BaseSpace * space,
size_t chunk_size,
Address area_start,
Address area_end,
VirtualMemory reservation )

Definition at line 16 of file memory-chunk-metadata.cc.

◆ ~MemoryChunkMetadata()

v8::internal::MemoryChunkMetadata::~MemoryChunkMetadata ( )

Definition at line 30 of file memory-chunk-metadata.cc.

Member Function Documentation

◆ add_wasted_memory()

void v8::internal::MemoryChunkMetadata::add_wasted_memory ( size_t waste)
inline

Definition at line 100 of file memory-chunk-metadata.h.

◆ allocated_bytes()

size_t v8::internal::MemoryChunkMetadata::allocated_bytes ( ) const
inline

Definition at line 101 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

◆ area_end()

Address v8::internal::MemoryChunkMetadata::area_end ( ) const
inline

Definition at line 62 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

◆ area_size()

size_t v8::internal::MemoryChunkMetadata::area_size ( ) const
inline

Definition at line 65 of file memory-chunk-metadata.h.

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

◆ area_start()

Address v8::internal::MemoryChunkMetadata::area_start ( ) const
inline

Definition at line 60 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

◆ AreaStartOffset()

static constexpr intptr_t v8::internal::MemoryChunkMetadata::AreaStartOffset ( )
inlinestaticconstexprprivate

Definition at line 174 of file memory-chunk-metadata.h.

◆ Chunk() [1/2]

MemoryChunk * v8::internal::MemoryChunkMetadata::Chunk ( )
inline

Definition at line 123 of file memory-chunk-metadata.h.

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

◆ Chunk() [2/2]

const MemoryChunk * v8::internal::MemoryChunkMetadata::Chunk ( ) const
inline

Definition at line 124 of file memory-chunk-metadata.h.

Here is the call graph for this function:

◆ ChunkAddress()

Address v8::internal::MemoryChunkMetadata::ChunkAddress ( ) const
inline

Definition at line 51 of file memory-chunk-metadata.h.

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

◆ Contains()

bool v8::internal::MemoryChunkMetadata::Contains ( Address addr) const
inline

Definition at line 89 of file memory-chunk-metadata.h.

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

◆ ContainsLimit()

bool v8::internal::MemoryChunkMetadata::ContainsLimit ( Address addr) const
inline

Definition at line 95 of file memory-chunk-metadata.h.

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

◆ DecreaseAllocatedBytes()

void v8::internal::MemoryChunkMetadata::DecreaseAllocatedBytes ( size_t bytes)
inline

Definition at line 117 of file memory-chunk-metadata.h.

Here is the call graph for this function:

◆ FromAddress()

MemoryChunkMetadata * v8::internal::MemoryChunkMetadata::FromAddress ( Address a)
static

Definition at line 17 of file memory-chunk-metadata-inl.h.

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

◆ FromHeapObject() [1/2]

MemoryChunkMetadata * v8::internal::MemoryChunkMetadata::FromHeapObject ( const HeapObjectLayout * o)
static

Definition at line 27 of file memory-chunk-metadata-inl.h.

Here is the call graph for this function:

◆ FromHeapObject() [2/2]

MemoryChunkMetadata * v8::internal::MemoryChunkMetadata::FromHeapObject ( Tagged< HeapObject > o)
static

Definition at line 22 of file memory-chunk-metadata-inl.h.

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

◆ heap()

Heap * v8::internal::MemoryChunkMetadata::heap ( ) const
inline

Definition at line 69 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

◆ HeapOffset()

static constexpr intptr_t v8::internal::MemoryChunkMetadata::HeapOffset ( )
inlinestaticconstexprprivate

Definition at line 170 of file memory-chunk-metadata.h.

◆ HighWaterMark()

Address v8::internal::MemoryChunkMetadata::HighWaterMark ( ) const
inline

Definition at line 103 of file memory-chunk-metadata.h.

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

◆ IncreaseAllocatedBytes()

void v8::internal::MemoryChunkMetadata::IncreaseAllocatedBytes ( size_t bytes)
inline

Definition at line 112 of file memory-chunk-metadata.h.

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

◆ InSharedSpace()

bool v8::internal::MemoryChunkMetadata::InSharedSpace ( ) const

Definition at line 36 of file memory-chunk-metadata.cc.

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

◆ InTrustedSpace()

bool v8::internal::MemoryChunkMetadata::InTrustedSpace ( ) const

Definition at line 40 of file memory-chunk-metadata.cc.

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

◆ IsMutablePageMetadata()

bool v8::internal::MemoryChunkMetadata::IsMutablePageMetadata ( ) const
inline

Definition at line 87 of file memory-chunk-metadata.h.

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

◆ IsWritable()

bool v8::internal::MemoryChunkMetadata::IsWritable ( ) const
inline

Definition at line 81 of file memory-chunk-metadata.h.

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

◆ MetadataAddress()

Address v8::internal::MemoryChunkMetadata::MetadataAddress ( ) const
inline

Definition at line 52 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

◆ Offset()

size_t v8::internal::MemoryChunkMetadata::Offset ( Address a) const
inline

Definition at line 55 of file memory-chunk-metadata.h.

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

◆ owner()

BaseSpace * v8::internal::MemoryChunkMetadata::owner ( ) const
inline

Definition at line 75 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

◆ reserved_memory()

VirtualMemory * v8::internal::MemoryChunkMetadata::reserved_memory ( )
inline

Definition at line 105 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

◆ ResetAllocationStatistics()

void v8::internal::MemoryChunkMetadata::ResetAllocationStatistics ( )
inline

Definition at line 107 of file memory-chunk-metadata.h.

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

◆ set_area_end()

void v8::internal::MemoryChunkMetadata::set_area_end ( Address area_end)
inline

Definition at line 63 of file memory-chunk-metadata.h.

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

◆ set_owner()

void v8::internal::MemoryChunkMetadata::set_owner ( BaseSpace * space)
inline

Definition at line 76 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

◆ set_size()

void v8::internal::MemoryChunkMetadata::set_size ( size_t size)
inline

Definition at line 58 of file memory-chunk-metadata.h.

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

◆ size()

size_t v8::internal::MemoryChunkMetadata::size ( ) const
inline

Definition at line 57 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

◆ UpdateHighWaterMark()

void v8::internal::MemoryChunkMetadata::UpdateHighWaterMark ( Address mark)
static

Definition at line 33 of file memory-chunk-metadata-inl.h.

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

◆ wasted_memory()

size_t v8::internal::MemoryChunkMetadata::wasted_memory ( ) const
inline

Definition at line 99 of file memory-chunk-metadata.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ CodeStubAssembler

friend class CodeStubAssembler
friend

Definition at line 181 of file memory-chunk-metadata.h.

◆ debug_helper_internal::ReadStringVisitor

friend class debug_helper_internal::ReadStringVisitor
friend

Definition at line 179 of file memory-chunk-metadata.h.

◆ MacroAssembler

friend class MacroAssembler
friend

Definition at line 182 of file memory-chunk-metadata.h.

Member Data Documentation

◆ allocated_bytes_

size_t v8::internal::MemoryChunkMetadata::allocated_bytes_
protected

Definition at line 143 of file memory-chunk-metadata.h.

◆ area_end_

Address v8::internal::MemoryChunkMetadata::area_end_
protected

Definition at line 154 of file memory-chunk-metadata.h.

◆ area_start_

Address v8::internal::MemoryChunkMetadata::area_start_
protected

Definition at line 164 of file memory-chunk-metadata.h.

◆ heap_

Heap* v8::internal::MemoryChunkMetadata::heap_
protected

Definition at line 161 of file memory-chunk-metadata.h.

◆ high_water_mark_

std::atomic<intptr_t> v8::internal::MemoryChunkMetadata::high_water_mark_
protected

Definition at line 149 of file memory-chunk-metadata.h.

◆ owner_

std::atomic<BaseSpace*> v8::internal::MemoryChunkMetadata::owner_
protected

Definition at line 167 of file memory-chunk-metadata.h.

◆ reservation_

VirtualMemory v8::internal::MemoryChunkMetadata::reservation_
protected

Definition at line 139 of file memory-chunk-metadata.h.

◆ size_

size_t v8::internal::MemoryChunkMetadata::size_
protected

Definition at line 152 of file memory-chunk-metadata.h.

◆ wasted_memory_

size_t v8::internal::MemoryChunkMetadata::wasted_memory_ = 0
protected

Definition at line 145 of file memory-chunk-metadata.h.


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