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

#include <spaces.h>

Inheritance diagram for Page:
Collaboration diagram for Page:

Public Member Functions

 INLINE (static Page *FromAddress(Address a))
 
 INLINE (static Page *FromAllocationTop(Address top))
 
Pagenext_page ()
 
Pageprev_page ()
 
void set_next_page (Page *page)
 
void set_prev_page (Page *page)
 
 INLINE (int Offset(Address a))
 
Address OffsetToAddress (int offset)
 
void ClearGCFields ()
 
void InitializeAsAnchor (PagedSpace *owner)
 
bool WasSweptPrecisely ()
 
bool WasSweptConservatively ()
 
bool WasSwept ()
 
void MarkSweptPrecisely ()
 
void MarkSweptConservatively ()
 
void ClearSweptPrecisely ()
 
void ClearSweptConservatively ()
 
void ResetFreeListStatistics ()
 
- Public Member Functions inherited from MemoryChunk
Address address ()
 
bool is_valid ()
 
MemoryChunknext_chunk () const
 
MemoryChunkprev_chunk () const
 
void set_next_chunk (MemoryChunk *next)
 
void set_prev_chunk (MemoryChunk *prev)
 
Spaceowner () const
 
void set_owner (Space *space)
 
VirtualMemoryreserved_memory ()
 
void InitializeReservedMemory ()
 
void set_reserved_memory (VirtualMemory *reservation)
 
bool scan_on_scavenge ()
 
void initialize_scan_on_scavenge (bool scan)
 
void set_scan_on_scavenge (bool scan)
 
int store_buffer_counter ()
 
void set_store_buffer_counter (int counter)
 
bool Contains (Address addr)
 
bool ContainsLimit (Address addr)
 
void SetFlag (int flag)
 
void ClearFlag (int flag)
 
void SetFlagTo (int flag, bool value)
 
bool IsFlagSet (int flag)
 
void SetFlags (intptr_t flags, intptr_t mask)
 
intptr_t GetFlags ()
 
ParallelSweepingState parallel_sweeping ()
 
void set_parallel_sweeping (ParallelSweepingState state)
 
bool TryParallelSweeping ()
 
void ResetLiveBytes ()
 
void IncrementLiveBytes (int by)
 
int LiveBytes ()
 
int write_barrier_counter ()
 
void set_write_barrier_counter (int counter)
 
int progress_bar ()
 
void set_progress_bar (int progress_bar)
 
void ResetProgressBar ()
 
bool IsLeftOfProgressBar (Object **slot)
 
size_t size () const
 
void set_size (size_t size)
 
void SetArea (Address area_start, Address area_end)
 
Executability executable ()
 
bool ContainsOnlyData ()
 
bool InNewSpace ()
 
bool InToSpace ()
 
bool InFromSpace ()
 
Bitmapmarkbits ()
 
void PrintMarkbits ()
 
uint32_t AddressToMarkbitIndex (Address addr)
 
Address MarkbitIndexToAddress (uint32_t index)
 
void InsertAfter (MemoryChunk *other)
 
void Unlink ()
 
Heapheap ()
 
bool IsEvacuationCandidate ()
 
bool ShouldSkipEvacuationSlotRecording ()
 
SkipListskip_list ()
 
void set_skip_list (SkipList *skip_list)
 
SlotsBufferslots_buffer ()
 
SlotsBuffer ** slots_buffer_address ()
 
void MarkEvacuationCandidate ()
 
void ClearEvacuationCandidate ()
 
Address area_start ()
 
Address area_end ()
 
int area_size ()
 
bool CommitArea (size_t requested)
 
size_t CommittedPhysicalMemory ()
 

Static Public Member Functions

static bool IsAlignedToPageSize (Address a)
 
static PageInitialize (Heap *heap, MemoryChunk *chunk, Executability executable, PagedSpace *owner)
 
- Static Public Member Functions inherited from MemoryChunk
static MemoryChunkFromAddress (Address a)
 
static MemoryChunkFromAnyPointerAddress (Heap *heap, Address addr)
 
static void IncrementLiveBytesFromGC (Address address, int by)
 
static void IncrementLiveBytesFromMutator (Address address, int by)
 
static uint32_t FastAddressToMarkbitIndex (Address addr)
 
static void UpdateHighWaterMark (Address mark)
 

Static Public Attributes

static const int kPageSize = 1 << kPageSizeBits
 
static const int kMaxRegularHeapObjectSize = kPageSize - kObjectStartOffset
 
static const intptr_t kPageAlignmentMask = (1 << kPageSizeBits) - 1
 
- Static Public Attributes inherited from MemoryChunk
static const int kWriteBarrierCounterGranularity = 500
 
static const int kPointersToHereAreInterestingMask
 
static const int kPointersFromHereAreInterestingMask
 
static const int kEvacuationCandidateMask
 
static const int kSkipEvacuationSlotsRecordingMask
 
static const intptr_t kAlignment
 
static const intptr_t kAlignmentMask = kAlignment - 1
 
static const intptr_t kSizeOffset = 0
 
static const intptr_t kLiveBytesOffset
 
static const size_t kSlotsBufferOffset = kLiveBytesOffset + kIntSize
 
static const size_t kWriteBarrierCounterOffset
 
static const size_t kHeaderSize
 
static const int kBodyOffset
 
static const int kObjectStartAlignment = 32 * kPointerSize
 
static const int kObjectStartOffset
 
static const int kFlagsOffset = kPointerSize
 

Friends

class MemoryAllocator
 

Additional Inherited Members

- Public Types inherited from MemoryChunk
enum  MemoryChunkFlags {
  IS_EXECUTABLE, ABOUT_TO_BE_FREED, POINTERS_TO_HERE_ARE_INTERESTING, POINTERS_FROM_HERE_ARE_INTERESTING,
  SCAN_ON_SCAVENGE, IN_FROM_SPACE, IN_TO_SPACE, NEW_SPACE_BELOW_AGE_MARK,
  CONTAINS_ONLY_DATA, EVACUATION_CANDIDATE, RESCAN_ON_EVACUATION, WAS_SWEPT_PRECISELY,
  WAS_SWEPT_CONSERVATIVELY, HAS_PROGRESS_BAR, NUM_MEMORY_CHUNK_FLAGS
}
 
enum  ParallelSweepingState { PARALLEL_SWEEPING_DONE, PARALLEL_SWEEPING_FINALIZE, PARALLEL_SWEEPING_IN_PROGRESS, PARALLEL_SWEEPING_PENDING }
 
- Static Protected Member Functions inherited from MemoryChunk
static MemoryChunkInitialize (Heap *heap, Address base, size_t size, Address area_start, Address area_end, Executability executable, Space *owner)
 
- Protected Attributes inherited from MemoryChunk
size_t size_
 
intptr_t flags_
 
Address area_start_
 
Address area_end_
 
VirtualMemory reservation_
 
Address owner_
 
Heapheap_
 
int store_buffer_counter_
 
int live_byte_count_
 
SlotsBufferslots_buffer_
 
SkipListskip_list_
 
intptr_t write_barrier_counter_
 
int progress_bar_
 
int high_water_mark_
 
AtomicWord parallel_sweeping_
 
intptr_t available_in_small_free_list_
 
intptr_t available_in_medium_free_list_
 
intptr_t available_in_large_free_list_
 
intptr_t available_in_huge_free_list_
 
intptr_t non_available_small_blocks_
 

Detailed Description

Definition at line 769 of file spaces.h.

Member Function Documentation

void ClearGCFields ( )
inline
void ClearSweptConservatively ( )
inline

Definition at line 842 of file spaces.h.

References MemoryChunk::ClearFlag(), and MemoryChunk::WAS_SWEPT_CONSERVATIVELY.

void ClearSweptPrecisely ( )
inline

Definition at line 841 of file spaces.h.

References MemoryChunk::ClearFlag(), and MemoryChunk::WAS_SWEPT_PRECISELY.

void InitializeAsAnchor ( PagedSpace owner)

Definition at line 419 of file spaces.cc.

References Page::set_next_page(), MemoryChunk::set_owner(), and Page::set_prev_page().

Referenced by PagedSpace::PagedSpace().

INLINE ( static Page FromAddressAddress a)
inline

Definition at line 775 of file spaces.h.

References Page::kPageAlignmentMask, and v8::internal::OffsetFrom().

INLINE ( static Page FromAllocationTopAddress top)
inline

Definition at line 783 of file spaces.h.

References MemoryChunk::FromAddress(), and v8::internal::kPointerSize.

INLINE ( int   OffsetAddress a)
inline

Definition at line 800 of file spaces.h.

References MemoryChunk::address().

static bool IsAlignedToPageSize ( Address  a)
inlinestatic

Definition at line 795 of file spaces.h.

References Page::kPageAlignmentMask, and v8::internal::OffsetFrom().

void MarkSweptConservatively ( )
inline
void MarkSweptPrecisely ( )
inline

Definition at line 838 of file spaces.h.

References MemoryChunk::SetFlag(), and MemoryChunk::WAS_SWEPT_PRECISELY.

Address OffsetToAddress ( int  offset)
inline

Definition at line 806 of file spaces.h.

References MemoryChunk::address(), and ASSERT_PAGE_OFFSET.

Page * prev_page ( )
inline

Definition at line 244 of file spaces-inl.h.

References ASSERT, MemoryChunk::owner(), and MemoryChunk::prev_chunk().

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

void set_next_page ( Page page)
inline
void set_prev_page ( Page page)
inline
bool WasSweptConservatively ( )
inline

Definition at line 835 of file spaces.h.

References MemoryChunk::IsFlagSet(), and MemoryChunk::WAS_SWEPT_CONSERVATIVELY.

Referenced by Page::WasSwept().

bool WasSweptPrecisely ( )
inline

Friends And Related Function Documentation

friend class MemoryAllocator
friend

Definition at line 863 of file spaces.h.

Field Documentation


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