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

#include <accounting-allocator.h>

Inheritance diagram for v8::internal::AccountingAllocator:
Collaboration diagram for v8::internal::AccountingAllocator:

Public Member Functions

 AccountingAllocator ()
 
 AccountingAllocator (const AccountingAllocator &)=delete
 
AccountingAllocatoroperator= (const AccountingAllocator &)=delete
 
virtual ~AccountingAllocator ()
 
SegmentAllocateSegment (size_t bytes, bool supports_compression)
 
void ReturnSegment (Segment *memory, bool supports_compression)
 
size_t GetCurrentMemoryUsage () const
 
size_t GetMaxMemoryUsage () const
 
void TraceZoneCreation (const Zone *zone)
 
void TraceZoneDestruction (const Zone *zone)
 
void TraceAllocateSegment (Segment *segment)
 

Protected Member Functions

virtual void TraceZoneCreationImpl (const Zone *zone)
 
virtual void TraceZoneDestructionImpl (const Zone *zone)
 
virtual void TraceAllocateSegmentImpl (Segment *segment)
 

Private Attributes

std::atomic< size_tcurrent_memory_usage_ {0}
 
std::atomic< size_tmax_memory_usage_ {0}
 
std::unique_ptr< VirtualMemoryreserved_area_
 
std::unique_ptr< base::BoundedPageAllocatorbounded_page_allocator_
 

Detailed Description

Definition at line 27 of file accounting-allocator.h.

Constructor & Destructor Documentation

◆ AccountingAllocator() [1/2]

v8::internal::AccountingAllocator::AccountingAllocator ( )

Definition at line 68 of file accounting-allocator.cc.

Here is the call graph for this function:

◆ AccountingAllocator() [2/2]

v8::internal::AccountingAllocator::AccountingAllocator ( const AccountingAllocator & )
delete

◆ ~AccountingAllocator()

v8::internal::AccountingAllocator::~AccountingAllocator ( )
virtualdefault

Member Function Documentation

◆ AllocateSegment()

Segment * v8::internal::AccountingAllocator::AllocateSegment ( size_t bytes,
bool supports_compression )

Definition at line 80 of file accounting-allocator.cc.

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

◆ GetCurrentMemoryUsage()

size_t v8::internal::AccountingAllocator::GetCurrentMemoryUsage ( ) const
inline

Definition at line 41 of file accounting-allocator.h.

Here is the caller graph for this function:

◆ GetMaxMemoryUsage()

size_t v8::internal::AccountingAllocator::GetMaxMemoryUsage ( ) const
inline

Definition at line 45 of file accounting-allocator.h.

Here is the caller graph for this function:

◆ operator=()

AccountingAllocator & v8::internal::AccountingAllocator::operator= ( const AccountingAllocator & )
delete

◆ ReturnSegment()

void v8::internal::AccountingAllocator::ReturnSegment ( Segment * memory,
bool supports_compression )

Definition at line 106 of file accounting-allocator.cc.

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

◆ TraceAllocateSegment()

void v8::internal::AccountingAllocator::TraceAllocateSegment ( Segment * segment)
inline

Definition at line 59 of file accounting-allocator.h.

Here is the caller graph for this function:

◆ TraceAllocateSegmentImpl()

virtual void v8::internal::AccountingAllocator::TraceAllocateSegmentImpl ( Segment * segment)
inlineprotectedvirtual

Reimplemented in v8::internal::TracingAccountingAllocator.

Definition at line 67 of file accounting-allocator.h.

◆ TraceZoneCreation()

void v8::internal::AccountingAllocator::TraceZoneCreation ( const Zone * zone)
inline

Definition at line 49 of file accounting-allocator.h.

Here is the caller graph for this function:

◆ TraceZoneCreationImpl()

virtual void v8::internal::AccountingAllocator::TraceZoneCreationImpl ( const Zone * zone)
inlineprotectedvirtual

Reimplemented in v8::internal::TracingAccountingAllocator.

Definition at line 65 of file accounting-allocator.h.

◆ TraceZoneDestruction()

void v8::internal::AccountingAllocator::TraceZoneDestruction ( const Zone * zone)
inline

Definition at line 54 of file accounting-allocator.h.

Here is the caller graph for this function:

◆ TraceZoneDestructionImpl()

virtual void v8::internal::AccountingAllocator::TraceZoneDestructionImpl ( const Zone * zone)
inlineprotectedvirtual

Reimplemented in v8::internal::TracingAccountingAllocator.

Definition at line 66 of file accounting-allocator.h.

Member Data Documentation

◆ bounded_page_allocator_

std::unique_ptr<base::BoundedPageAllocator> v8::internal::AccountingAllocator::bounded_page_allocator_
private

Definition at line 74 of file accounting-allocator.h.

◆ current_memory_usage_

std::atomic<size_t> v8::internal::AccountingAllocator::current_memory_usage_ {0}
private

Definition at line 70 of file accounting-allocator.h.

◆ max_memory_usage_

std::atomic<size_t> v8::internal::AccountingAllocator::max_memory_usage_ {0}
private

Definition at line 71 of file accounting-allocator.h.

◆ reserved_area_

std::unique_ptr<VirtualMemory> v8::internal::AccountingAllocator::reserved_area_
private

Definition at line 73 of file accounting-allocator.h.


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