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
NewSpace Class Reference

#include <spaces.h>

Inheritance diagram for NewSpace:
Collaboration diagram for NewSpace:

Public Member Functions

 NewSpace (Heap *heap)
 
bool SetUp (int reserved_semispace_size_, int max_semispace_size)
 
void TearDown ()
 
bool HasBeenSetUp ()
 
void Flip ()
 
void Grow ()
 
void Shrink ()
 
bool Contains (Address a)
 
bool Contains (Object *o)
 
virtual intptr_t Size ()
 
int SizeAsInt ()
 
intptr_t EffectiveCapacity ()
 
intptr_t Capacity ()
 
intptr_t CommittedMemory ()
 
intptr_t Available ()
 
int MaximumCapacity ()
 
int InitialCapacity ()
 
Address top ()
 
Address bottom ()
 
Address age_mark ()
 
void set_age_mark (Address mark)
 
Address start ()
 
uintptr_t mask ()
 
 INLINE (uint32_t AddressToMarkbitIndex(Address addr))
 
 INLINE (Address MarkbitIndexToAddress(uint32_t index))
 
Addressallocation_top_address ()
 
Addressallocation_limit_address ()
 
MUST_USE_RESULT INLINE (MaybeObject *AllocateRaw(int size_in_bytes))
 
void ResetAllocationInfo ()
 
void LowerInlineAllocationLimit (intptr_t step)
 
Address FromSpacePageLow ()
 
Address FromSpacePageHigh ()
 
Address FromSpaceStart ()
 
Address FromSpaceEnd ()
 
Address ToSpaceStart ()
 
Address ToSpaceEnd ()
 
bool ToSpaceContains (Address address)
 
bool FromSpaceContains (Address address)
 
bool ToSpaceContains (Object *o)
 
bool FromSpaceContains (Object *o)
 
bool AddFreshPage ()
 
virtual bool ReserveSpace (int bytes)
 
template<typename StringType >
void ShrinkStringAtAllocationBoundary (String *string, int len)
 
void CollectStatistics ()
 
void ReportStatistics ()
 
void ClearHistograms ()
 
void RecordAllocation (HeapObject *obj)
 
void RecordPromotion (HeapObject *obj)
 
bool CommitFromSpaceIfNeeded ()
 
bool UncommitFromSpace ()
 
intptr_t inline_allocation_limit_step ()
 
SemiSpaceactive_space ()
 
- Public Member Functions inherited from Space
 Space (Heap *heap, AllocationSpace id, Executability executable)
 
virtual ~Space ()
 
Heapheap () const
 
Executability executable ()
 
AllocationSpace identity ()
 
virtual intptr_t SizeOfObjects ()
 
virtual int RoundSizeDownToObjectAlignment (int size)
 
- Public Member Functions inherited from Malloced
void * operator new (size_t size)
 
void operator delete (void *p)
 

Friends

class SemiSpaceIterator
 

Additional Inherited Members

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

Detailed Description

Definition at line 2088 of file spaces.h.

Constructor & Destructor Documentation

NewSpace ( Heap heap)
inlineexplicit

Definition at line 2091 of file spaces.h.

Member Function Documentation

SemiSpace* active_space ( )
inline

Definition at line 2304 of file spaces.h.

Referenced by PromotionQueue::ActivateGuardIfOnTheSamePage().

Address age_mark ( )
inline

Definition at line 2187 of file spaces.h.

References SemiSpace::age_mark().

Referenced by Heap::ShouldBePromoted().

Address* allocation_limit_address ( )
inline

Definition at line 2209 of file spaces.h.

References AllocationInfo::limit.

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

Address* allocation_top_address ( )
inline

Definition at line 2208 of file spaces.h.

References AllocationInfo::top.

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

Address bottom ( )
inline

Definition at line 2184 of file spaces.h.

References SemiSpace::space_start().

Referenced by SemiSpaceIterator::SemiSpaceIterator().

void ClearHistograms ( )

Definition at line 1735 of file spaces.cc.

References v8::internal::LAST_TYPE.

Referenced by NewSpace::CollectStatistics().

void CollectStatistics ( )
bool CommitFromSpaceIfNeeded ( )
inline

Definition at line 2290 of file spaces.h.

References SemiSpace::Commit(), and SemiSpace::is_committed().

Referenced by Heap::EnsureFromSpaceIsCommitted().

intptr_t CommittedMemory ( )
inline
bool Contains ( Address  a)
inline
bool Contains ( Object o)
inline

Definition at line 2127 of file spaces.h.

intptr_t EffectiveCapacity ( )
inline
void Flip ( )

Definition at line 1130 of file spaces.cc.

References SemiSpace::Swap().

bool FromSpaceContains ( Address  address)
inline

Definition at line 2243 of file spaces.h.

References SemiSpace::Contains().

Referenced by Heap::InFromSpace().

bool FromSpaceContains ( Object o)
inline

Definition at line 2251 of file spaces.h.

References SemiSpace::Contains().

Address FromSpaceEnd ( )
inline

Definition at line 2234 of file spaces.h.

References SemiSpace::space_end().

Referenced by IncrementalMarking::PrepareForScavenge(), and Heap::ZapFromSpace().

Address FromSpacePageHigh ( )
inline

Definition at line 2232 of file spaces.h.

References SemiSpace::page_high().

Address FromSpacePageLow ( )
inline

Definition at line 2231 of file spaces.h.

References SemiSpace::page_low().

Address FromSpaceStart ( )
inline

Definition at line 2233 of file spaces.h.

References SemiSpace::space_start().

Referenced by IncrementalMarking::PrepareForScavenge(), and Heap::ZapFromSpace().

bool HasBeenSetUp ( )
inline

Definition at line 2106 of file spaces.h.

References SemiSpace::HasBeenSetUp().

Referenced by TEST().

int InitialCapacity ( )
inline

Definition at line 2173 of file spaces.h.

References ASSERT, and SemiSpace::InitialCapacity().

Referenced by NewSpace::ReserveSpace(), and NewSpace::Shrink().

INLINE ( uint32_t   AddressToMarkbitIndexAddress addr)
inline
INLINE ( Address   MarkbitIndexToAddressuint32_t index)
inline

Definition at line 2203 of file spaces.h.

References v8::internal::kPointerSizeLog2.

MUST_USE_RESULT INLINE ( MaybeObject *  AllocateRawint size_in_bytes)
intptr_t inline_allocation_limit_step ( )
inline

Definition at line 2300 of file spaces.h.

void LowerInlineAllocationLimit ( intptr_t  step)
inline
uintptr_t mask ( )
inline

Definition at line 2194 of file spaces.h.

Referenced by Heap::NewSpaceMask().

int MaximumCapacity ( )
inline

Definition at line 2167 of file spaces.h.

References ASSERT, and SemiSpace::MaximumCapacity().

Referenced by Heap::CheckNewSpaceExpansionCriteria(), and NewSpace::Grow().

void RecordAllocation ( HeapObject obj)
void RecordPromotion ( HeapObject obj)
void ReportStatistics ( )
bool ReserveSpace ( int  bytes)
virtual
void ResetAllocationInfo ( )

Definition at line 1192 of file spaces.cc.

References Bitmap::Clear(), and SemiSpace::Reset().

Referenced by NewSpace::SetUp().

void set_age_mark ( Address  mark)
inline

Definition at line 2189 of file spaces.h.

References SemiSpace::set_age_mark().

void ShrinkStringAtAllocationBoundary ( String string,
int  len 
)
inline
int SizeAsInt ( )
inline

Definition at line 2141 of file spaces.h.

References NewSpace::Size().

Referenced by Heap::RecordStats(), and NewSpace::Shrink().

Address start ( )
inline

Definition at line 2193 of file spaces.h.

Referenced by Heap::NewSpaceStart().

bool ToSpaceContains ( Address  address)
inline

Definition at line 2240 of file spaces.h.

References SemiSpace::Contains().

Referenced by Heap::Contains(), Heap::InSpace(), and Heap::InToSpace().

bool ToSpaceContains ( Object o)
inline

Definition at line 2250 of file spaces.h.

References SemiSpace::Contains().

Address ToSpaceEnd ( )
inline

Definition at line 2238 of file spaces.h.

References SemiSpace::space_end().

Referenced by PromotionQueue::Initialize().

Address ToSpaceStart ( )
inline

Definition at line 2237 of file spaces.h.

References SemiSpace::space_start().

Referenced by PromotionQueue::Initialize().

bool UncommitFromSpace ( )
inline

Definition at line 2295 of file spaces.h.

References SemiSpace::is_committed(), and SemiSpace::Uncommit().

Referenced by Heap::UncommitFromSpace().

Friends And Related Function Documentation

friend class SemiSpaceIterator
friend

Definition at line 2342 of file spaces.h.


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