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

#include <spaces.h>

Inheritance diagram for v8::internal::Space:
Collaboration diagram for v8::internal::Space:

Public Member Functions

 Space (Heap *heap, AllocationSpace id, std::unique_ptr< FreeList > free_list)
 
 ~Space () override=default
 
 Space (const Space &)=delete
 
Spaceoperator= (const Space &)=delete
 
virtual size_t SizeOfObjects () const
 
virtual size_t Available () const =0
 
virtual std::unique_ptr< ObjectIteratorGetObjectIterator (Heap *heap)=0
 
void IncrementExternalBackingStoreBytes (ExternalBackingStoreType type, size_t amount)
 
void DecrementExternalBackingStoreBytes (ExternalBackingStoreType type, size_t amount)
 
virtual size_t ExternalBackingStoreBytes (ExternalBackingStoreType type) const
 
virtual MutablePageMetadatafirst_page ()
 
virtual MutablePageMetadatalast_page ()
 
virtual const MutablePageMetadatafirst_page () const
 
virtual const MutablePageMetadatalast_page () const
 
virtual heap::List< MutablePageMetadata > & memory_chunk_list ()
 
virtual PageMetadataInitializePage (MutablePageMetadata *chunk)
 
virtual void NotifyBlackAreaCreated (size_t size)
 
virtual void NotifyBlackAreaDestroyed (size_t size)
 
FreeListfree_list ()
 
Address FirstPageAddress () const
 
- Public Member Functions inherited from v8::internal::BaseSpace
 BaseSpace (const BaseSpace &)=delete
 
BaseSpaceoperator= (const BaseSpace &)=delete
 
Heapheap () const
 
AllocationSpace identity () const
 
virtual size_t CommittedMemory () const
 
virtual size_t MaximumCommittedMemory () const
 
virtual size_t CommittedPhysicalMemory () const =0
 
virtual size_t Size () const =0
 

Static Public Member Functions

static void MoveExternalBackingStoreBytes (ExternalBackingStoreType type, Space *from, Space *to, size_t amount)
 
- Static Public Member Functions inherited from v8::internal::Malloced
static void * operator new (size_t size)
 
static void operator delete (void *p)
 

Protected Attributes

heap::List< MutablePageMetadatamemory_chunk_list_
 
std::atomic< size_texternal_backing_store_bytes_ [static_cast< int >(ExternalBackingStoreType::kNumValues)] = {0}
 
std::unique_ptr< FreeListfree_list_
 
- Protected Attributes inherited from v8::internal::BaseSpace
Heapheap_
 
AllocationSpace id_
 
std::atomic< size_tcommitted_ {0}
 
size_t max_committed_ = 0
 

Additional Inherited Members

- Protected Member Functions inherited from v8::internal::BaseSpace
 BaseSpace (Heap *heap, AllocationSpace id)
 
virtual ~BaseSpace ()=default
 
void AccountCommitted (size_t bytes)
 
void AccountUncommitted (size_t bytes)
 

Detailed Description

Definition at line 67 of file spaces.h.

Constructor & Destructor Documentation

◆ Space() [1/2]

v8::internal::Space::Space ( Heap * heap,
AllocationSpace id,
std::unique_ptr< FreeList > free_list )
inline

Definition at line 72 of file spaces.h.

◆ ~Space()

v8::internal::Space::~Space ( )
overridedefault

◆ Space() [2/2]

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

Member Function Documentation

◆ Available()

virtual size_t v8::internal::Space::Available ( ) const
pure virtual

◆ DecrementExternalBackingStoreBytes()

void v8::internal::Space::DecrementExternalBackingStoreBytes ( ExternalBackingStoreType type,
size_t amount )
inline

Definition at line 43 of file spaces-inl.h.

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

◆ ExternalBackingStoreBytes()

virtual size_t v8::internal::Space::ExternalBackingStoreBytes ( ExternalBackingStoreType type) const
inlinevirtual

Definition at line 95 of file spaces.h.

◆ first_page() [1/2]

virtual MutablePageMetadata * v8::internal::Space::first_page ( )
inlinevirtual

Reimplemented in v8::internal::LargeObjectSpace, and v8::internal::SemiSpace.

Definition at line 100 of file spaces.h.

◆ first_page() [2/2]

virtual const MutablePageMetadata * v8::internal::Space::first_page ( ) const
inlinevirtual

Reimplemented in v8::internal::LargeObjectSpace, and v8::internal::SemiSpace.

Definition at line 105 of file spaces.h.

◆ FirstPageAddress()

Address v8::internal::Space::FirstPageAddress ( ) const
inline

Definition at line 125 of file spaces.h.

◆ free_list()

FreeList * v8::internal::Space::free_list ( )
inline

Definition at line 123 of file spaces.h.

Here is the caller graph for this function:

◆ GetObjectIterator()

virtual std::unique_ptr< ObjectIterator > v8::internal::Space::GetObjectIterator ( Heap * heap)
pure virtual

Implemented in v8::internal::LargeObjectSpace, and v8::internal::SemiSpace.

Here is the caller graph for this function:

◆ IncrementExternalBackingStoreBytes()

void v8::internal::Space::IncrementExternalBackingStoreBytes ( ExternalBackingStoreType type,
size_t amount )
inline

Definition at line 36 of file spaces-inl.h.

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

◆ InitializePage()

virtual PageMetadata * v8::internal::Space::InitializePage ( MutablePageMetadata * chunk)
inlinevirtual

Reimplemented in v8::internal::SemiSpace.

Definition at line 116 of file spaces.h.

◆ last_page() [1/2]

virtual MutablePageMetadata * v8::internal::Space::last_page ( )
inlinevirtual

Reimplemented in v8::internal::SemiSpace.

Definition at line 103 of file spaces.h.

◆ last_page() [2/2]

virtual const MutablePageMetadata * v8::internal::Space::last_page ( ) const
inlinevirtual

Reimplemented in v8::internal::SemiSpace.

Definition at line 108 of file spaces.h.

◆ memory_chunk_list()

virtual heap::List< MutablePageMetadata > & v8::internal::Space::memory_chunk_list ( )
inlinevirtual

Definition at line 112 of file spaces.h.

◆ MoveExternalBackingStoreBytes()

void v8::internal::Space::MoveExternalBackingStoreBytes ( ExternalBackingStoreType type,
Space * from,
Space * to,
size_t amount )
inlinestatic

Definition at line 50 of file spaces-inl.h.

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

◆ NotifyBlackAreaCreated()

virtual void v8::internal::Space::NotifyBlackAreaCreated ( size_t size)
inlinevirtual

Definition at line 120 of file spaces.h.

Here is the caller graph for this function:

◆ NotifyBlackAreaDestroyed()

virtual void v8::internal::Space::NotifyBlackAreaDestroyed ( size_t size)
inlinevirtual

Definition at line 121 of file spaces.h.

Here is the caller graph for this function:

◆ operator=()

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

◆ SizeOfObjects()

virtual size_t v8::internal::Space::SizeOfObjects ( ) const
inlinevirtual

Reimplemented in v8::internal::LargeObjectSpace, and v8::internal::SemiSpace.

Definition at line 82 of file spaces.h.

Member Data Documentation

◆ external_backing_store_bytes_

std::atomic<size_t> v8::internal::Space::external_backing_store_bytes_[static_cast< int >( ExternalBackingStoreType::kNumValues)] = {0}
protected

Definition at line 138 of file spaces.h.

◆ free_list_

std::unique_ptr<FreeList> v8::internal::Space::free_list_
protected

Definition at line 140 of file spaces.h.

◆ memory_chunk_list_

heap::List<MutablePageMetadata> v8::internal::Space::memory_chunk_list_
protected

Definition at line 136 of file spaces.h.


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