v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PagedSpace Class Reference

#include <spaces.h>

Inheritance diagram for PagedSpace:
Collaboration diagram for PagedSpace:

Data Structures

struct  SizeStats
 

Public Member Functions

 PagedSpace (Heap *heap, intptr_t max_capacity, AllocationSpace id, Executability executable)
 
virtual ~PagedSpace ()
 
bool SetUp ()
 
bool HasBeenSetUp ()
 
void TearDown ()
 
bool Contains (Address a)
 
bool Contains (HeapObject *o)
 
MUST_USE_RESULT MaybeObject * FindObject (Address addr)
 
void RepairFreeListsAfterBoot ()
 
void PrepareForMarkCompact ()
 
intptr_t Capacity ()
 
intptr_t CommittedMemory ()
 
intptr_t MaximumCommittedMemory ()
 
size_t CommittedPhysicalMemory ()
 
void ObtainFreeListStatistics (Page *p, SizeStats *sizes)
 
void ResetFreeListStatistics ()
 
void ClearStats ()
 
void AddToAccountingStats (intptr_t bytes)
 
intptr_t Available ()
 
virtual intptr_t Size ()
 
virtual intptr_t SizeOfObjects ()
 
virtual intptr_t Waste ()
 
Address top ()
 
Address limit ()
 
Addressallocation_top_address ()
 
Addressallocation_limit_address ()
 
MUST_USE_RESULT MaybeObject * AllocateRaw (int size_in_bytes)
 
int Free (Address start, int size_in_bytes)
 
void ResetFreeList ()
 
void SetTopAndLimit (Address top, Address limit)
 
void EmptyAllocationInfo ()
 
void Allocate (int bytes)
 
void IncreaseCapacity (int size)
 
void ReleasePage (Page *page, bool unlink)
 
Pageanchor ()
 
bool was_swept_conservatively ()
 
void set_was_swept_conservatively (bool b)
 
void SetPagesToSweep (Page *first)
 
void IncrementUnsweptFreeBytes (intptr_t by)
 
void IncreaseUnsweptFreeBytes (Page *p)
 
void DecrementUnsweptFreeBytes (intptr_t by)
 
void DecreaseUnsweptFreeBytes (Page *p)
 
void ResetUnsweptFreeBytes ()
 
bool AdvanceSweeper (intptr_t bytes_to_sweep)
 
bool EnsureSweeperProgress (intptr_t size_in_bytes)
 
bool IsLazySweepingComplete ()
 
PageFirstPage ()
 
PageLastPage ()
 
void EvictEvacuationCandidatesFromFreeLists ()
 
bool CanExpand ()
 
int CountTotalPages ()
 
int AreaSize ()
 
- Public Member Functions inherited from Space
 Space (Heap *heap, AllocationSpace id, Executability executable)
 
virtual ~Space ()
 
Heapheap () const
 
Executability executable ()
 
AllocationSpace identity ()
 
virtual int RoundSizeDownToObjectAlignment (int size)
 
- Public Member Functions inherited from Malloced
void * operator new (size_t size)
 
void operator delete (void *p)
 

Static Public Member Functions

static bool ShouldBeSweptLazily (Page *p)
 
- Static Public Member Functions inherited from Malloced
static void FatalProcessOutOfMemory ()
 
static void * New (size_t size)
 
static void Delete (void *p)
 

Protected Member Functions

FreeListfree_list ()
 
intptr_t SizeOfFirstPage ()
 
bool Expand ()
 
HeapObjectAllocateLinearly (int size_in_bytes)
 
virtual MUST_USE_RESULT
HeapObject
SlowAllocateRaw (int size_in_bytes)
 

Protected Attributes

int area_size_
 
intptr_t max_capacity_
 
AllocationStats accounting_stats_
 
Page anchor_
 
FreeList free_list_
 
AllocationInfo allocation_info_
 
bool was_swept_conservatively_
 
Pagefirst_unswept_page_
 
intptr_t unswept_free_bytes_
 

Friends

class PageIterator
 
class MarkCompactCollector
 

Detailed Description

Definition at line 1696 of file spaces.h.

Constructor & Destructor Documentation

virtual ~PagedSpace ( )
inlinevirtual

Definition at line 1704 of file spaces.h.

Member Function Documentation

void AddToAccountingStats ( intptr_t  bytes)
inline

Definition at line 1775 of file spaces.h.

References PagedSpace::accounting_stats_.

Referenced by MarkCompactCollector::RefillFreeLists().

void Allocate ( int  bytes)
inline

Definition at line 1849 of file spaces.h.

References PagedSpace::accounting_stats_.

Referenced by FreeList::Allocate().

HeapObject * AllocateLinearly ( int  size_in_bytes)
inlineprotected
Address* allocation_limit_address ( )
inline
Address* allocation_top_address ( )
inline
Page* anchor ( )
inline
intptr_t Available ( )
inline
bool CanExpand ( )
void ClearStats ( )
inline
bool Contains ( HeapObject o)
inline

Definition at line 1722 of file spaces.h.

References HeapObject::address(), and PagedSpace::Contains().

Referenced by PagedSpace::Contains().

int CountTotalPages ( )
void DecreaseUnsweptFreeBytes ( Page p)
inline
void DecrementUnsweptFreeBytes ( intptr_t  by)
inline

Definition at line 1909 of file spaces.h.

References PagedSpace::unswept_free_bytes_.

Referenced by MarkCompactCollector::RefillFreeLists().

void EmptyAllocationInfo ( )
inline
void EvictEvacuationCandidatesFromFreeLists ( )
Page* FirstPage ( )
inline

Definition at line 1933 of file spaces.h.

References PagedSpace::anchor_, and Page::next_page().

Referenced by Heap::CreateCode().

int Free ( Address  start,
int  size_in_bytes 
)
inline
FreeList* free_list ( )
inlineprotected

Definition at line 1949 of file spaces.h.

References PagedSpace::free_list_.

Referenced by MarkCompactCollector::RefillFreeLists().

bool HasBeenSetUp ( )

Definition at line 968 of file spaces.cc.

void IncreaseCapacity ( int  size)

Definition at line 1113 of file spaces.cc.

References PagedSpace::accounting_stats_.

Referenced by Page::Initialize().

void IncreaseUnsweptFreeBytes ( Page p)
inline
void IncrementUnsweptFreeBytes ( intptr_t  by)
inline

Definition at line 1900 of file spaces.h.

References PagedSpace::unswept_free_bytes_.

bool IsLazySweepingComplete ( )
inline
Page* LastPage ( )
inline

Definition at line 1934 of file spaces.h.

References PagedSpace::anchor_, and Page::prev_page().

Referenced by TEST().

intptr_t MaximumCommittedMemory ( )
inline

Definition at line 1745 of file spaces.h.

References PagedSpace::accounting_stats_.

Referenced by Heap::TearDown().

void RepairFreeListsAfterBoot ( )

Definition at line 2578 of file spaces.cc.

References PagedSpace::free_list_, Space::heap(), and FreeList::RepairLists().

void ResetFreeList ( )
inline

Definition at line 1827 of file spaces.h.

References PagedSpace::free_list_, and FreeList::Reset().

void ResetFreeListStatistics ( )

Definition at line 1104 of file spaces.cc.

References PagedSpace::PageIterator, and Page::ResetFreeListStatistics().

Referenced by PagedSpace::ClearStats().

void ResetUnsweptFreeBytes ( )
inline
void set_was_swept_conservatively ( bool  b)
inline

Definition at line 1884 of file spaces.h.

References PagedSpace::was_swept_conservatively_.

void SetPagesToSweep ( Page first)
inline
void SetTopAndLimit ( Address  top,
Address  limit 
)
inline
bool SetUp ( )

Definition at line 963 of file spaces.cc.

Referenced by Heap::SetUp(), and TEST().

virtual intptr_t Size ( )
inlinevirtual

Implements Space.

Definition at line 1788 of file spaces.h.

References PagedSpace::accounting_stats_.

Referenced by StatisticsExtension::GetCounters(), and PagedSpace::SizeOfObjects().

bool was_swept_conservatively ( )
inline

Definition at line 1883 of file spaces.h.

References PagedSpace::was_swept_conservatively_.

Referenced by HeapSnapshotGenerator::GenerateSnapshot().

virtual intptr_t Waste ( )
inlinevirtual

Definition at line 1797 of file spaces.h.

References PagedSpace::accounting_stats_.

Friends And Related Function Documentation

friend class MarkCompactCollector
friend

Definition at line 1994 of file spaces.h.

Field Documentation

int area_size_
protected

Definition at line 1951 of file spaces.h.

Referenced by PagedSpace::AreaSize(), and PagedSpace::PagedSpace().

intptr_t max_capacity_
protected

Definition at line 1954 of file spaces.h.

Referenced by PagedSpace::CanExpand(), PagedSpace::Expand(), and PagedSpace::PagedSpace().

bool was_swept_conservatively_
protected

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