v8  3.14.5(node0.10.28)
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:

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)
 
virtual void RepairFreeListsAfterBoot ()
 
virtual void PrepareForMarkCompact ()
 
intptr_t Capacity ()
 
intptr_t CommittedMemory ()
 
void ClearStats ()
 
intptr_t Available ()
 
virtual intptr_t Size ()
 
virtual intptr_t SizeOfObjects ()
 
virtual intptr_t Waste ()
 
Address top ()
 
Address limit ()
 
MUST_USE_RESULT MaybeObject * AllocateRaw (int size_in_bytes)
 
virtual bool ReserveSpace (int bytes)
 
int Free (Address start, int size_in_bytes)
 
void ResetFreeList ()
 
void SetTop (Address top, Address limit)
 
void Allocate (int bytes)
 
void IncreaseCapacity (int size)
 
void ReleasePage (Page *page)
 
void ReleaseAllUnusedPages ()
 
Pageanchor ()
 
bool was_swept_conservatively ()
 
void set_was_swept_conservatively (bool b)
 
void SetPagesToSweep (Page *first)
 
void IncrementUnsweptFreeBytes (int by)
 
void IncreaseUnsweptFreeBytes (Page *p)
 
void DecreaseUnsweptFreeBytes (Page *p)
 
bool AdvanceSweeper (intptr_t bytes_to_sweep)
 
bool IsSweepingComplete ()
 
PageFirstPage ()
 
PageLastPage ()
 
void CountFreeListItems (Page *p, FreeList::SizeStats *sizes)
 
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

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_
 
int page_extra_
 
bool was_swept_conservatively_
 
Pagefirst_unswept_page_
 
intptr_t unswept_free_bytes_
 

Friends

class PageIterator
 

Detailed Description

Definition at line 1445 of file spaces.h.

Constructor & Destructor Documentation

virtual ~PagedSpace ( )
inlinevirtual

Definition at line 1453 of file spaces.h.

Member Function Documentation

void Allocate ( int  bytes)
inline

Definition at line 1557 of file spaces.h.

References PagedSpace::accounting_stats_.

HeapObject * AllocateLinearly ( int  size_in_bytes)
inlineprotected
Page* anchor ( )
inline
intptr_t Available ( )
inline
bool CanExpand ( )
void ClearStats ( )
inline

Definition at line 1498 of file spaces.h.

References PagedSpace::accounting_stats_.

Referenced by SimulateFullSpace().

intptr_t CommittedMemory ( )
inline
bool Contains ( HeapObject o)
inline

Definition at line 1471 of file spaces.h.

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

Referenced by PagedSpace::Contains().

void CountFreeListItems ( Page p,
FreeList::SizeStats *  sizes 
)
inline

Definition at line 1636 of file spaces.h.

References PagedSpace::free_list_.

Referenced by MarkCompactCollector::CollectEvacuationCandidates().

int CountTotalPages ( )

Definition at line 911 of file spaces.cc.

References PagedSpace::PageIterator.

Referenced by MarkCompactCollector::CollectEvacuationCandidates(), and TEST().

void DecreaseUnsweptFreeBytes ( Page p)
inline
void EvictEvacuationCandidatesFromFreeLists ( )
Page* FirstPage ( )
inline

Definition at line 1633 of file spaces.h.

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

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

bool HasBeenSetUp ( )

Definition at line 811 of file spaces.cc.

void IncreaseCapacity ( int  size)
inline

Definition at line 1561 of file spaces.h.

References PagedSpace::accounting_stats_.

Referenced by Page::Initialize().

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

Definition at line 1613 of file spaces.h.

References PagedSpace::unswept_free_bytes_.

Page* LastPage ( )
inline

Definition at line 1634 of file spaces.h.

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

Referenced by TEST().

void RepairFreeListsAfterBoot ( )
virtual

Definition at line 2295 of file spaces.cc.

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

void ResetFreeList ( )
inline

Definition at line 1545 of file spaces.h.

References PagedSpace::free_list_.

Referenced by SimulateFullSpace().

void set_was_swept_conservatively ( bool  b)
inline

Definition at line 1597 of file spaces.h.

References PagedSpace::was_swept_conservatively_.

void SetPagesToSweep ( Page first)
inline
bool SetUp ( )

Definition at line 806 of file spaces.cc.

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

virtual intptr_t Size ( )
inlinevirtual

Implements Space.

Definition at line 1511 of file spaces.h.

References PagedSpace::accounting_stats_.

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

bool was_swept_conservatively ( )
inline

Definition at line 1596 of file spaces.h.

References PagedSpace::was_swept_conservatively_.

Referenced by HeapSnapshotGenerator::GenerateSnapshot().

virtual intptr_t Waste ( )
inlinevirtual

Definition at line 1523 of file spaces.h.

References PagedSpace::accounting_stats_.

Friends And Related Function Documentation

friend class PageIterator
friend

Field Documentation

int area_size_
protected

Definition at line 1653 of file spaces.h.

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

intptr_t max_capacity_
protected

Definition at line 1656 of file spaces.h.

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

int page_extra_
protected
bool was_swept_conservatively_
protected

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