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
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 MaximumCommittedMemory ()
 
size_t CommittedPhysicalMemory ()
 
intptr_t Available ()
 
int MaximumCapacity ()
 
int InitialCapacity ()
 
Address top ()
 
void set_top (Address top)
 
Address limit ()
 
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 UpdateInlineAllocationLimit (int size_in_bytes)
 
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 ()
 
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 2393 of file spaces.h.

Constructor & Destructor Documentation

NewSpace ( Heap heap)
inlineexplicit

Definition at line 2396 of file spaces.h.

Member Function Documentation

SemiSpace* active_space ( )
inline

Definition at line 2624 of file spaces.h.

Referenced by PromotionQueue::ActivateGuardIfOnTheSamePage().

Address age_mark ( )
inline

Definition at line 2513 of file spaces.h.

References SemiSpace::age_mark().

Referenced by Heap::ShouldBePromoted().

Address* allocation_limit_address ( )
inline

Definition at line 2539 of file spaces.h.

References AllocationInfo::limit_address().

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

Address* allocation_top_address ( )
inline

Definition at line 2534 of file spaces.h.

References AllocationInfo::top_address().

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

Address bottom ( )
inline

Definition at line 2510 of file spaces.h.

References SemiSpace::space_start().

Referenced by SemiSpaceIterator::SemiSpaceIterator().

void ClearHistograms ( )

Definition at line 1903 of file spaces.cc.

References v8::internal::LAST_TYPE.

Referenced by NewSpace::CollectStatistics().

void CollectStatistics ( )
bool CommitFromSpaceIfNeeded ( )
inline

Definition at line 2610 of file spaces.h.

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

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

Definition at line 2432 of file spaces.h.

intptr_t EffectiveCapacity ( )
inline
void Flip ( )

Definition at line 1304 of file spaces.cc.

References SemiSpace::Swap().

bool FromSpaceContains ( Address  address)
inline

Definition at line 2570 of file spaces.h.

References SemiSpace::Contains().

Referenced by Heap::InFromSpace().

bool FromSpaceContains ( Object o)
inline

Definition at line 2578 of file spaces.h.

References SemiSpace::Contains().

Address FromSpaceEnd ( )
inline

Definition at line 2561 of file spaces.h.

References SemiSpace::space_end().

Referenced by IncrementalMarking::PrepareForScavenge().

Address FromSpacePageHigh ( )
inline

Definition at line 2559 of file spaces.h.

References SemiSpace::page_high().

Address FromSpacePageLow ( )
inline

Definition at line 2558 of file spaces.h.

References SemiSpace::page_low().

Address FromSpaceStart ( )
inline

Definition at line 2560 of file spaces.h.

References SemiSpace::space_start().

Referenced by IncrementalMarking::PrepareForScavenge().

bool HasBeenSetUp ( )
inline

Definition at line 2411 of file spaces.h.

References SemiSpace::HasBeenSetUp().

Referenced by TEST().

int InitialCapacity ( )
inline

Definition at line 2487 of file spaces.h.

References ASSERT, and SemiSpace::InitialCapacity().

Referenced by NewSpace::Shrink().

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

Definition at line 2529 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 2620 of file spaces.h.

Referenced by NewSpace::UpdateInlineAllocationLimit().

Address limit ( )
inline

Definition at line 2504 of file spaces.h.

References ASSERT, MemoryChunk::ContainsLimit(), and SemiSpace::current_page().

Referenced by NewSpace::AddFreshPage().

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

Definition at line 2520 of file spaces.h.

Referenced by Heap::NewSpaceMask().

int MaximumCapacity ( )
inline

Definition at line 2481 of file spaces.h.

References ASSERT, and SemiSpace::MaximumCapacity().

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

intptr_t MaximumCommittedMemory ( )
inline

Definition at line 2467 of file spaces.h.

References SemiSpace::MaximumCommittedMemory().

Referenced by Heap::TearDown().

void RecordAllocation ( HeapObject obj)
void RecordPromotion ( HeapObject obj)
void ResetAllocationInfo ( )

Definition at line 1359 of file spaces.cc.

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

Referenced by NewSpace::SetUp().

void set_age_mark ( Address  mark)
inline

Definition at line 2515 of file spaces.h.

References SemiSpace::set_age_mark().

void set_top ( Address  top)
inline

Definition at line 2498 of file spaces.h.

References ASSERT, MemoryChunk::ContainsLimit(), and SemiSpace::current_page().

Referenced by SeqString::Truncate().

int SizeAsInt ( )
inline

Definition at line 2446 of file spaces.h.

References NewSpace::Size().

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

Address start ( )
inline

Definition at line 2519 of file spaces.h.

Referenced by Heap::NewSpaceStart().

bool ToSpaceContains ( Address  address)
inline

Definition at line 2567 of file spaces.h.

References SemiSpace::Contains().

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

bool ToSpaceContains ( Object o)
inline

Definition at line 2577 of file spaces.h.

References SemiSpace::Contains().

Address ToSpaceEnd ( )
inline

Definition at line 2565 of file spaces.h.

References SemiSpace::space_end().

Referenced by PromotionQueue::Initialize().

Address ToSpaceStart ( )
inline

Definition at line 2564 of file spaces.h.

References SemiSpace::space_start().

Referenced by PromotionQueue::Initialize().

bool UncommitFromSpace ( )
inline

Definition at line 2615 of file spaces.h.

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

Friends And Related Function Documentation

friend class SemiSpaceIterator
friend

Definition at line 2662 of file spaces.h.


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