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

#include <zone.h>

Collaboration diagram for v8::internal::Zone:

Public Member Functions

 Zone (AccountingAllocator *allocator, const char *name, bool support_compression=false)
 
 ~Zone ()
 
bool supports_compression () const
 
template<typename TypeTag >
void * Allocate (size_t size)
 
template<typename TypeTag = void>
void Delete (void *pointer, size_t size)
 
template<typename T , typename... Args>
TNew (Args &&... args)
 
template<typename T , typename TypeTag = T[]>
TAllocateArray (size_t length)
 
template<typename T , typename TypeTag = T[]>
base::Vector< TAllocateVector (size_t length)
 
template<typename T , typename TypeTag = T[]>
base::Vector< TNewVector (size_t length)
 
template<typename T , typename TypeTag = T[]>
base::Vector< TNewVector (size_t length, T value)
 
template<typename T , typename TypeTag = std::remove_const_t<T>[]>
base::Vector< std::remove_const_t< T > > CloneVector (base::Vector< T > v)
 
template<typename T , typename TypeTag = T[]>
void DeleteArray (T *pointer, size_t length)
 
void Seal ()
 
void Reset ()
 
size_t segment_bytes_allocated () const
 
const char * name () const
 
size_t allocation_size () const
 
size_t allocation_size_for_tracing () const
 
size_t freed_size_for_tracing () const
 
AccountingAllocatorallocator () const
 
V8_WARN_UNUSED_RESULT ZoneSnapshot Snapshot () const
 

Private Member Functions

void * AsanNew (size_t size)
 
void DeleteAll ()
 
void ReleaseSegment (Segment *segment)
 
V8_NOINLINE V8_PRESERVE_MOST void Expand (size_t size)
 

Private Attributes

std::atomic< size_tallocation_size_ = {0}
 
std::atomic< size_tsegment_bytes_allocated_ = {0}
 
Address position_ = 0
 
Address limit_ = 0
 
AccountingAllocatorallocator_
 
Segmentsegment_head_ = nullptr
 
const char * name_
 
const bool supports_compression_
 
bool sealed_ = false
 

Static Private Attributes

static const size_t kAlignmentInBytes = 8
 
static const size_t kMinimumSegmentSize = 8 * KB
 
static const size_t kMaximumSegmentSize = 32 * KB
 

Friends

class ZoneSnapshot
 

Detailed Description

Definition at line 43 of file zone.h.

Constructor & Destructor Documentation

◆ Zone()

v8::internal::Zone::Zone ( AccountingAllocator * allocator,
const char * name,
bool support_compression = false )

Definition at line 32 of file zone.cc.

Here is the call graph for this function:

◆ ~Zone()

v8::internal::Zone::~Zone ( )

Definition at line 40 of file zone.cc.

Here is the call graph for this function:

Member Function Documentation

◆ Allocate()

template<typename TypeTag >
void * v8::internal::Zone::Allocate ( size_t size)
inline

Definition at line 61 of file zone.h.

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

◆ AllocateArray()

template<typename T , typename TypeTag = T[]>
T * v8::internal::Zone::AllocateArray ( size_t length)
inline

Definition at line 127 of file zone.h.

◆ AllocateVector()

template<typename T , typename TypeTag = T[]>
base::Vector< T > v8::internal::Zone::AllocateVector ( size_t length)
inline

Definition at line 136 of file zone.h.

Here is the caller graph for this function:

◆ allocation_size()

size_t v8::internal::Zone::allocation_size ( ) const
inline

Definition at line 189 of file zone.h.

Here is the caller graph for this function:

◆ allocation_size_for_tracing()

size_t v8::internal::Zone::allocation_size_for_tracing ( ) const
inline

Definition at line 197 of file zone.h.

Here is the caller graph for this function:

◆ allocator()

AccountingAllocator * v8::internal::Zone::allocator ( ) const
inline

Definition at line 216 of file zone.h.

◆ AsanNew()

void * v8::internal::Zone::AsanNew ( size_t size)
private

Definition at line 45 of file zone.cc.

Here is the call graph for this function:

◆ CloneVector()

template<typename T , typename TypeTag = std::remove_const_t<T>[]>
base::Vector< std::remove_const_t< T > > v8::internal::Zone::CloneVector ( base::Vector< T > v)
inline

Definition at line 159 of file zone.h.

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

◆ Delete()

template<typename TypeTag = void>
void v8::internal::Zone::Delete ( void * pointer,
size_t size )
inline

Definition at line 91 of file zone.h.

Here is the call graph for this function:

◆ DeleteAll()

void v8::internal::Zone::DeleteAll ( )
private

Definition at line 113 of file zone.cc.

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

◆ DeleteArray()

template<typename T , typename TypeTag = T[]>
void v8::internal::Zone::DeleteArray ( T * pointer,
size_t length )
inline

Definition at line 171 of file zone.h.

Here is the caller graph for this function:

◆ Expand()

void v8::internal::Zone::Expand ( size_t size)
private

Definition at line 146 of file zone.cc.

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

◆ freed_size_for_tracing()

size_t v8::internal::Zone::freed_size_for_tracing ( ) const
inline

Definition at line 208 of file zone.h.

◆ name()

const char * v8::internal::Zone::name ( ) const
inline

Definition at line 185 of file zone.h.

Here is the caller graph for this function:

◆ New()

template<typename T , typename... Args>
T * v8::internal::Zone::New ( Args &&... args)
inline

Definition at line 114 of file zone.h.

◆ NewVector() [1/2]

template<typename T , typename TypeTag = T[]>
base::Vector< T > v8::internal::Zone::NewVector ( size_t length)
inline

Definition at line 143 of file zone.h.

Here is the caller graph for this function:

◆ NewVector() [2/2]

template<typename T , typename TypeTag = T[]>
base::Vector< T > v8::internal::Zone::NewVector ( size_t length,
T value )
inline

Definition at line 152 of file zone.h.

◆ ReleaseSegment()

void v8::internal::Zone::ReleaseSegment ( Segment * segment)
private

Definition at line 139 of file zone.cc.

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

◆ Reset()

void v8::internal::Zone::Reset ( )

Definition at line 72 of file zone.cc.

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

◆ Seal()

void v8::internal::Zone::Seal ( )
inline

Definition at line 176 of file zone.h.

◆ segment_bytes_allocated()

size_t v8::internal::Zone::segment_bytes_allocated ( ) const
inline

Definition at line 183 of file zone.h.

Here is the caller graph for this function:

◆ Snapshot()

ZoneSnapshot v8::internal::Zone::Snapshot ( ) const

Definition at line 111 of file zone.cc.

Here is the caller graph for this function:

◆ supports_compression()

bool v8::internal::Zone::supports_compression ( ) const
inline

Definition at line 50 of file zone.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ ZoneSnapshot

friend class ZoneSnapshot
friend

Definition at line 281 of file zone.h.

Member Data Documentation

◆ allocation_size_

std::atomic<size_t> v8::internal::Zone::allocation_size_ = {0}
private

Definition at line 249 of file zone.h.

◆ allocator_

AccountingAllocator* v8::internal::Zone::allocator_
private

Definition at line 266 of file zone.h.

◆ kAlignmentInBytes

const size_t v8::internal::Zone::kAlignmentInBytes = 8
staticprivate

Definition at line 240 of file zone.h.

◆ kMaximumSegmentSize

const size_t v8::internal::Zone::kMaximumSegmentSize = 32 * KB
staticprivate

Definition at line 246 of file zone.h.

◆ kMinimumSegmentSize

const size_t v8::internal::Zone::kMinimumSegmentSize = 8 * KB
staticprivate

Definition at line 243 of file zone.h.

◆ limit_

Address v8::internal::Zone::limit_ = 0
private

Definition at line 264 of file zone.h.

◆ name_

const char* v8::internal::Zone::name_
private

Definition at line 269 of file zone.h.

◆ position_

Address v8::internal::Zone::position_ = 0
private

Definition at line 263 of file zone.h.

◆ sealed_

bool v8::internal::Zone::sealed_ = false
private

Definition at line 271 of file zone.h.

◆ segment_bytes_allocated_

std::atomic<size_t> v8::internal::Zone::segment_bytes_allocated_ = {0}
private

Definition at line 254 of file zone.h.

◆ segment_head_

Segment* v8::internal::Zone::segment_head_ = nullptr
private

Definition at line 268 of file zone.h.

◆ supports_compression_

const bool v8::internal::Zone::supports_compression_
private

Definition at line 270 of file zone.h.


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