V8 Project
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, Executability executable)
 
virtual ~Space ()
 
Heapheap () const
 
Executability executable ()
 
AllocationSpace identity ()
 
virtual intptr_t Size ()=0
 
virtual intptr_t SizeOfObjects ()
 
virtual int RoundSizeDownToObjectAlignment (int size)
 
- Public Member Functions inherited from v8::internal::Malloced
void * operator new (size_t size)
 
void operator delete (void *p)
 

Private Attributes

Heapheap_
 
AllocationSpace id_
 
Executability executable_
 

Additional Inherited Members

- Static Public Member Functions inherited from v8::internal::Malloced
static void FatalProcessOutOfMemory ()
 
static void * New (size_t size)
 
static void Delete (void *p)
 

Detailed Description

Definition at line 816 of file spaces.h.

Constructor & Destructor Documentation

◆ Space()

v8::internal::Space::Space ( Heap heap,
AllocationSpace  id,
Executability  executable 
)
inline

Definition at line 818 of file spaces.h.

819  : heap_(heap), id_(id), executable_(executable) {}
AllocationSpace id_
Definition: spaces.h:852
Executability executable()
Definition: spaces.h:826
Heap * heap() const
Definition: spaces.h:823
Executability executable_
Definition: spaces.h:853

◆ ~Space()

virtual v8::internal::Space::~Space ( )
inlinevirtual

Definition at line 821 of file spaces.h.

821 {}

Member Function Documentation

◆ executable()

Executability v8::internal::Space::executable ( )
inline

Definition at line 826 of file spaces.h.

826 { return executable_; }

References executable_.

Referenced by v8::internal::LargeObjectSpace::AllocateRaw(), v8::internal::SemiSpace::Commit(), v8::internal::PagedSpace::CreateEmergencyMemory(), v8::internal::PagedSpace::Expand(), v8::internal::SemiSpace::GrowTo(), and v8::internal::PagedSpace::UseEmergencyMemory().

+ Here is the caller graph for this function:

◆ heap()

Heap* v8::internal::Space::heap ( ) const
inline

Definition at line 823 of file spaces.h.

823 { return heap_; }

References heap_.

Referenced by v8::internal::NewSpace::AddFreshPage(), v8::internal::FreeList::Allocate(), v8::internal::LargeObjectSpace::AllocateRaw(), v8::internal::LargeObjectSpace::Available(), v8::internal::SemiSpace::Commit(), v8::internal::PagedSpace::CreateEmergencyMemory(), v8::internal::PagedSpace::EvictEvacuationCandidatesFromFreeLists(), v8::internal::PagedSpace::Expand(), v8::internal::PagedSpace::FindObject(), v8::internal::PagedSpace::FreeEmergencyMemory(), v8::internal::LargeObjectSpace::FreeUnmarkedObjects(), v8::internal::SemiSpace::GrowTo(), v8::internal::PagedSpace::PagedSpace(), v8::internal::PagedSpace::ReleasePage(), v8::internal::PagedSpace::RepairFreeListsAfterBoot(), v8::internal::NewSpace::ReportStatistics(), v8::internal::NewSpace::SetUp(), v8::internal::SemiSpace::ShrinkTo(), v8::internal::PagedSpace::SizeOfFirstPage(), v8::internal::PagedSpace::SizeOfObjects(), v8::internal::PagedSpace::SlowAllocateRaw(), v8::internal::NewSpace::SlowAllocateRaw(), v8::internal::PagedSpace::TearDown(), v8::internal::NewSpace::TearDown(), v8::internal::LargeObjectSpace::TearDown(), v8::internal::SemiSpace::Uncommit(), v8::internal::NewSpace::UpdateInlineAllocationLimit(), v8::internal::PagedSpace::UseEmergencyMemory(), and v8::internal::PagedSpace::WaitForSweeperThreadsAndRetryAllocation().

+ Here is the caller graph for this function:

◆ identity()

◆ RoundSizeDownToObjectAlignment()

virtual int v8::internal::Space::RoundSizeDownToObjectAlignment ( int  size)
inlinevirtual

Reimplemented in v8::internal::PropertyCellSpace, v8::internal::CellSpace, and v8::internal::MapSpace.

Definition at line 838 of file spaces.h.

838  {
839  if (id_ == CODE_SPACE) {
840  return RoundDown(size, kCodeAlignment);
841  } else {
842  return RoundDown(size, kPointerSize);
843  }
844  }
enable harmony numeric enable harmony object literal extensions Optimize object size
T RoundDown(T x, intptr_t m)
Definition: macros.h:399
const int kPointerSize
Definition: globals.h:129
const intptr_t kCodeAlignment
Definition: globals.h:240

References v8::internal::CODE_SPACE, id_, v8::internal::kCodeAlignment, v8::internal::kPointerSize, RoundDown(), and size.

Referenced by v8::internal::FreeList::Allocate().

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

◆ Size()

virtual intptr_t v8::internal::Space::Size ( )
pure virtual

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

Referenced by SizeOfObjects().

+ Here is the caller graph for this function:

◆ SizeOfObjects()

virtual intptr_t v8::internal::Space::SizeOfObjects ( )
inlinevirtual

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

Definition at line 836 of file spaces.h.

836 { return Size(); }
virtual intptr_t Size()=0

References Size().

+ Here is the call graph for this function:

Member Data Documentation

◆ executable_

Executability v8::internal::Space::executable_
private

Definition at line 853 of file spaces.h.

Referenced by executable().

◆ heap_

Heap* v8::internal::Space::heap_
private

Definition at line 851 of file spaces.h.

Referenced by heap().

◆ id_

AllocationSpace v8::internal::Space::id_
private

Definition at line 852 of file spaces.h.

Referenced by identity(), and RoundSizeDownToObjectAlignment().


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