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

#include <paged-spaces.h>

Inheritance diagram for v8::internal::CompactionSpace:
Collaboration diagram for v8::internal::CompactionSpace:

Public Types

enum class  DestinationHeap { kSameHeap , kSharedSpaceHeap }
 
- Public Types inherited from v8::internal::PagedSpaceBase
using iterator = PageIterator
 
using const_iterator = ConstPageIterator
 

Public Member Functions

 CompactionSpace (Heap *heap, AllocationSpace id, Executability executable, CompactionSpaceKind compaction_space_kind, DestinationHeap destination_heap)
 
const std::vector< PageMetadata * > & GetNewPages ()
 
void RefillFreeList () final
 
DestinationHeap destination_heap () const
 
- Public Member Functions inherited from v8::internal::PagedSpace
 PagedSpace (Heap *heap, AllocationSpace id, Executability executable, std::unique_ptr< FreeList > free_list, CompactionSpaceKind compaction_space_kind)
 
AllocatorPolicyCreateAllocatorPolicy (MainAllocator *allocator) final
 
- Public Member Functions inherited from v8::internal::PagedSpaceBase
 PagedSpaceBase (Heap *heap, AllocationSpace id, Executability executable, std::unique_ptr< FreeList > free_list, CompactionSpaceKind compaction_space_kind)
 
 ~PagedSpaceBase () override
 
bool Contains (Address a) const
 
bool Contains (Tagged< Object > o) const
 
bool ContainsSlow (Address addr) const
 
Executability executable () const
 
size_t Capacity () const
 
size_t CommittedPhysicalMemory () const override
 
void IncrementCommittedPhysicalMemory (size_t increment_value)
 
void DecrementCommittedPhysicalMemory (size_t decrement_value)
 
void ClearAllocatorState ()
 
size_t Available () const override
 
size_t Size () const override
 
size_t Waste () const
 
V8_WARN_UNUSED_RESULT std::optional< std::pair< Address, size_t > > RawAllocateBackground (LocalHeap *local_heap, size_t min_size_in_bytes, size_t max_size_in_bytes, AllocationOrigin origin)
 
V8_INLINE size_t Free (Address start, size_t size_in_bytes)
 
V8_INLINE size_t FreeDuringSweep (Address start, size_t size_in_bytes)
 
void ResetFreeList ()
 
void DecreaseAllocatedBytes (size_t bytes, PageMetadata *page)
 
void IncreaseAllocatedBytes (size_t bytes, PageMetadata *page)
 
void DecreaseCapacity (size_t bytes)
 
void IncreaseCapacity (size_t bytes)
 
PageMetadataInitializePage (MutablePageMetadata *chunk) override
 
virtual void ReleasePage (PageMetadata *page)
 
virtual size_t AddPage (PageMetadata *page)
 
virtual void RemovePage (PageMetadata *page)
 
PageMetadataRemovePageSafe (int size_in_bytes)
 
bool CanExpand (size_t size) const
 
int CountTotalPages () const
 
int AreaSize () const
 
bool is_compaction_space () const
 
CompactionSpaceKind compaction_space_kind () const
 
void MergeCompactionSpace (CompactionSpace *other)
 
base::Mutexmutex ()
 
void UnlinkFreeListCategories (PageMetadata *page)
 
size_t RelinkFreeListCategories (PageMetadata *page)
 
PageMetadatafirst_page () override
 
const PageMetadatafirst_page () const override
 
PageMetadatalast_page () override
 
const PageMetadatalast_page () const override
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
std::unique_ptr< ObjectIteratorGetObjectIterator (Heap *heap) override
 
void AddRangeToActiveSystemPages (PageMetadata *page, Address start, Address end)
 
void ReduceActiveSystemPages (PageMetadata *page, ActiveSystemPages active_system_pages)
 
bool TryExpand (LocalHeap *local_heap, AllocationOrigin origin)
 
void RefineAllocatedBytesAfterSweeping (PageMetadata *page)
 
virtual void AdjustDifferenceInAllocatedBytes (size_t diff)
 
template<bool during_sweep>
size_t FreeInternal (Address start, size_t size_in_bytes)
 

Protected Member Functions

void NotifyNewPage (PageMetadata *page) final
 
bool snapshotable () const final
 
- Protected Member Functions inherited from v8::internal::PagedSpaceBase
bool HasPages () const
 
void TearDown ()
 
size_t committed_physical_memory () const
 
void ReleasePageImpl (PageMetadata *page, MemoryAllocator::FreeMode free_mode)
 
void AddPageImpl (PageMetadata *page)
 

Protected Attributes

std::vector< PageMetadata * > new_pages_
 
const DestinationHeap destination_heap_
 
- Protected Attributes inherited from v8::internal::PagedSpaceBase
Executability executable_
 
CompactionSpaceKind compaction_space_kind_
 
size_t area_size_
 
AllocationStats accounting_stats_
 
base::Mutex space_mutex_
 
std::atomic< size_tcommitted_physical_memory_ {0}
 
size_t size_at_last_gc_ = 0
 

Additional Inherited Members

- Static Public Attributes inherited from v8::internal::PagedSpaceBase
static const size_t kCompactionMemoryWanted = 500 * KB
 

Detailed Description

Definition at line 375 of file paged-spaces.h.

Member Enumeration Documentation

◆ DestinationHeap

Enumerator
kSameHeap 
kSharedSpaceHeap 

Definition at line 378 of file paged-spaces.h.

Constructor & Destructor Documentation

◆ CompactionSpace()

v8::internal::CompactionSpace::CompactionSpace ( Heap * heap,
AllocationSpace id,
Executability executable,
CompactionSpaceKind compaction_space_kind,
DestinationHeap destination_heap )
inline

Definition at line 385 of file paged-spaces.h.

Member Function Documentation

◆ destination_heap()

DestinationHeap v8::internal::CompactionSpace::destination_heap ( ) const
inline

Definition at line 398 of file paged-spaces.h.

Here is the caller graph for this function:

◆ GetNewPages()

const std::vector< PageMetadata * > & v8::internal::CompactionSpace::GetNewPages ( )
inline

Definition at line 394 of file paged-spaces.h.

◆ NotifyNewPage()

void v8::internal::CompactionSpace::NotifyNewPage ( PageMetadata * page)
finalprotectedvirtual

Reimplemented from v8::internal::PagedSpaceBase.

Definition at line 573 of file paged-spaces.cc.

Here is the call graph for this function:

◆ RefillFreeList()

void v8::internal::CompactionSpace::RefillFreeList ( )
finalvirtual

Reimplemented from v8::internal::PagedSpaceBase.

Definition at line 584 of file paged-spaces.cc.

Here is the call graph for this function:

◆ snapshotable()

bool v8::internal::CompactionSpace::snapshotable ( ) const
inlinefinalprotectedvirtual

Reimplemented from v8::internal::PagedSpaceBase.

Definition at line 404 of file paged-spaces.h.

Member Data Documentation

◆ destination_heap_

const DestinationHeap v8::internal::CompactionSpace::destination_heap_
protected

Definition at line 408 of file paged-spaces.h.

◆ new_pages_

std::vector<PageMetadata*> v8::internal::CompactionSpace::new_pages_
protected

Definition at line 407 of file paged-spaces.h.


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