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

#include <large-spaces.h>

Inheritance diagram for v8::internal::LargeObjectSpace:
Collaboration diagram for v8::internal::LargeObjectSpace:

Public Types

using iterator = LargePageIterator
 
using const_iterator = ConstLargePageIterator
 

Public Member Functions

 ~LargeObjectSpace () override
 
void TearDown ()
 
size_t Available () const override
 
size_t Size () const override
 
size_t SizeOfObjects () const override
 
size_t CommittedPhysicalMemory () const override
 
int PageCount () const
 
void ShrinkPageToObjectSize (LargePageMetadata *page, Tagged< HeapObject > object, size_t object_size)
 
bool Contains (Tagged< HeapObject > obj) const
 
bool ContainsSlow (Address addr) const
 
bool IsEmpty () const
 
virtual void AddPage (LargePageMetadata *page, size_t object_size)
 
virtual void RemovePage (LargePageMetadata *page)
 
LargePageMetadatafirst_page () override
 
const LargePageMetadatafirst_page () const override
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
std::unique_ptr< ObjectIteratorGetObjectIterator (Heap *heap) override
 
void AddAllocationObserver (AllocationObserver *observer)
 
void RemoveAllocationObserver (AllocationObserver *observer)
 
Address pending_object () const
 
void ResetPendingObject ()
 
base::Mutexpending_allocation_mutex ()
 
void set_objects_size (size_t objects_size)
 
- Public Member Functions inherited from v8::internal::Space
 Space (Heap *heap, AllocationSpace id, std::unique_ptr< FreeList > free_list)
 
 ~Space () override=default
 
 Space (const Space &)=delete
 
Spaceoperator= (const Space &)=delete
 
void IncrementExternalBackingStoreBytes (ExternalBackingStoreType type, size_t amount)
 
void DecrementExternalBackingStoreBytes (ExternalBackingStoreType type, size_t amount)
 
virtual size_t ExternalBackingStoreBytes (ExternalBackingStoreType type) const
 
virtual MutablePageMetadatalast_page ()
 
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
 

Protected Member Functions

 LargeObjectSpace (Heap *heap, AllocationSpace id)
 
void AdvanceAndInvokeAllocationObservers (Address soon_object, size_t size)
 
LargePageMetadataAllocateLargePage (int object_size, Executability executable)
 
void UpdatePendingObject (Tagged< HeapObject > object)
 
- 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)
 

Protected Attributes

std::atomic< size_tsize_
 
int page_count_
 
std::atomic< size_tobjects_size_
 
base::RecursiveMutex allocation_mutex_
 
std::atomic< Addresspending_object_
 
base::Mutex pending_allocation_mutex_
 
AllocationCounter allocation_counter_
 
- Protected Attributes inherited from v8::internal::Space
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
 

Friends

class LargeObjectSpaceObjectIterator
 

Additional Inherited Members

- Static Public Member Functions inherited from v8::internal::Space
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)
 

Detailed Description

Definition at line 33 of file large-spaces.h.

Member Typedef Documentation

◆ const_iterator

◆ iterator

Constructor & Destructor Documentation

◆ ~LargeObjectSpace()

v8::internal::LargeObjectSpace::~LargeObjectSpace ( )
inlineoverride

Definition at line 38 of file large-spaces.h.

◆ LargeObjectSpace()

v8::internal::LargeObjectSpace::LargeObjectSpace ( Heap * heap,
AllocationSpace id )
protected

Definition at line 53 of file large-spaces.cc.

Member Function Documentation

◆ AddAllocationObserver()

void v8::internal::LargeObjectSpace::AddAllocationObserver ( AllocationObserver * observer)

Definition at line 94 of file large-spaces.cc.

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

◆ AddPage()

void v8::internal::LargeObjectSpace::AddPage ( LargePageMetadata * page,
size_t object_size )
virtual

Reimplemented in v8::internal::CodeLargeObjectSpace.

Definition at line 193 of file large-spaces.cc.

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

◆ AdvanceAndInvokeAllocationObservers()

void v8::internal::LargeObjectSpace::AdvanceAndInvokeAllocationObservers ( Address soon_object,
size_t size )
protected

Definition at line 78 of file large-spaces.cc.

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

◆ AllocateLargePage()

LargePageMetadata * v8::internal::LargeObjectSpace::AllocateLargePage ( int object_size,
Executability executable )
protected

Definition at line 150 of file large-spaces.cc.

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

◆ Available()

size_t v8::internal::LargeObjectSpace::Available ( ) const
overridevirtual

Implements v8::internal::Space.

Reimplemented in v8::internal::NewLargeObjectSpace.

Definition at line 60 of file large-spaces.cc.

Here is the caller graph for this function:

◆ begin() [1/2]

iterator v8::internal::LargeObjectSpace::begin ( )
inline

Definition at line 77 of file large-spaces.h.

Here is the caller graph for this function:

◆ begin() [2/2]

const_iterator v8::internal::LargeObjectSpace::begin ( ) const
inline

Definition at line 80 of file large-spaces.h.

◆ CommittedPhysicalMemory()

size_t v8::internal::LargeObjectSpace::CommittedPhysicalMemory ( ) const
overridevirtual

Implements v8::internal::BaseSpace.

Definition at line 172 of file large-spaces.cc.

Here is the call graph for this function:

◆ Contains()

bool v8::internal::LargeObjectSpace::Contains ( Tagged< HeapObject > obj) const

Definition at line 258 of file large-spaces.cc.

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

◆ ContainsSlow()

bool v8::internal::LargeObjectSpace::ContainsSlow ( Address addr) const

Definition at line 268 of file large-spaces.cc.

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

◆ end() [1/2]

iterator v8::internal::LargeObjectSpace::end ( )
inline

Definition at line 78 of file large-spaces.h.

Here is the caller graph for this function:

◆ end() [2/2]

const_iterator v8::internal::LargeObjectSpace::end ( ) const
inline

Definition at line 81 of file large-spaces.h.

◆ first_page() [1/2]

const LargePageMetadata * v8::internal::LargeObjectSpace::first_page ( ) const
inlineoverridevirtual

Reimplemented from v8::internal::Space.

Definition at line 72 of file large-spaces.h.

◆ first_page() [2/2]

LargePageMetadata * v8::internal::LargeObjectSpace::first_page ( )
inlineoverridevirtual

Reimplemented from v8::internal::Space.

Definition at line 69 of file large-spaces.h.

Here is the caller graph for this function:

◆ GetObjectIterator()

std::unique_ptr< ObjectIterator > v8::internal::LargeObjectSpace::GetObjectIterator ( Heap * heap)
overridevirtual

Implements v8::internal::Space.

Definition at line 276 of file large-spaces.cc.

Here is the caller graph for this function:

◆ IsEmpty()

bool v8::internal::LargeObjectSpace::IsEmpty ( ) const
inline

Definition at line 64 of file large-spaces.h.

◆ PageCount()

int v8::internal::LargeObjectSpace::PageCount ( ) const
inline

Definition at line 52 of file large-spaces.h.

◆ pending_allocation_mutex()

base::Mutex * v8::internal::LargeObjectSpace::pending_allocation_mutex ( )
inline

Definition at line 106 of file large-spaces.h.

Here is the caller graph for this function:

◆ pending_object()

Address v8::internal::LargeObjectSpace::pending_object ( ) const
inline

Definition at line 98 of file large-spaces.h.

Here is the caller graph for this function:

◆ RemoveAllocationObserver()

void v8::internal::LargeObjectSpace::RemoveAllocationObserver ( AllocationObserver * observer)

Definition at line 98 of file large-spaces.cc.

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

◆ RemovePage()

void v8::internal::LargeObjectSpace::RemovePage ( LargePageMetadata * page)
virtual

Reimplemented in v8::internal::CodeLargeObjectSpace.

Definition at line 207 of file large-spaces.cc.

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

◆ ResetPendingObject()

void v8::internal::LargeObjectSpace::ResetPendingObject ( )
inline

Definition at line 102 of file large-spaces.h.

Here is the caller graph for this function:

◆ set_objects_size()

void v8::internal::LargeObjectSpace::set_objects_size ( size_t objects_size)
inline

Definition at line 108 of file large-spaces.h.

Here is the caller graph for this function:

◆ ShrinkPageToObjectSize()

void v8::internal::LargeObjectSpace::ShrinkPageToObjectSize ( LargePageMetadata * page,
Tagged< HeapObject > object,
size_t object_size )

Definition at line 220 of file large-spaces.cc.

Here is the call graph for this function:

◆ Size()

size_t v8::internal::LargeObjectSpace::Size ( ) const
inlineoverridevirtual

Implements v8::internal::BaseSpace.

Definition at line 46 of file large-spaces.h.

Here is the caller graph for this function:

◆ SizeOfObjects()

size_t v8::internal::LargeObjectSpace::SizeOfObjects ( ) const
inlineoverridevirtual

Reimplemented from v8::internal::Space.

Definition at line 47 of file large-spaces.h.

Here is the caller graph for this function:

◆ TearDown()

void v8::internal::LargeObjectSpace::TearDown ( )

Definition at line 66 of file large-spaces.cc.

Here is the call graph for this function:

◆ UpdatePendingObject()

void v8::internal::LargeObjectSpace::UpdatePendingObject ( Tagged< HeapObject > object)
protected

Definition at line 343 of file large-spaces.cc.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ LargeObjectSpaceObjectIterator

friend class LargeObjectSpaceObjectIterator
friend

Definition at line 139 of file large-spaces.h.

Member Data Documentation

◆ allocation_counter_

AllocationCounter v8::internal::LargeObjectSpace::allocation_counter_
protected

Definition at line 136 of file large-spaces.h.

◆ allocation_mutex_

base::RecursiveMutex v8::internal::LargeObjectSpace::allocation_mutex_
protected

Definition at line 127 of file large-spaces.h.

◆ objects_size_

std::atomic<size_t> v8::internal::LargeObjectSpace::objects_size_
protected

Definition at line 122 of file large-spaces.h.

◆ page_count_

int v8::internal::LargeObjectSpace::page_count_
protected

Definition at line 121 of file large-spaces.h.

◆ pending_allocation_mutex_

base::Mutex v8::internal::LargeObjectSpace::pending_allocation_mutex_
protected

Definition at line 134 of file large-spaces.h.

◆ pending_object_

std::atomic<Address> v8::internal::LargeObjectSpace::pending_object_
protected

Definition at line 131 of file large-spaces.h.

◆ size_

std::atomic<size_t> v8::internal::LargeObjectSpace::size_
protected

Definition at line 120 of file large-spaces.h.


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