V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
v8::internal::MemoryChunk Class Reference
Inheritance diagram for v8::internal::MemoryChunk:
v8::internal::LargePage v8::internal::Page v8::internal::ReadOnlyPage

Classes

struct  Hasher
 

Public Types

enum  Flag {
  NO_FLAGS = 0u, IS_EXECUTABLE = 1u << 0, POINTERS_TO_HERE_ARE_INTERESTING = 1u << 1, POINTERS_FROM_HERE_ARE_INTERESTING = 1u << 2,
  IN_FROM_SPACE = 1u << 3, IN_TO_SPACE = 1u << 4, NEW_SPACE_BELOW_AGE_MARK = 1u << 5, EVACUATION_CANDIDATE = 1u << 6,
  NEVER_EVACUATE = 1u << 7, HAS_PROGRESS_BAR = 1u << 8, PAGE_NEW_OLD_PROMOTION = 1u << 9, PAGE_NEW_NEW_PROMOTION = 1u << 10,
  FORCE_EVACUATION_CANDIDATE_FOR_TESTING = 1u << 11, NEVER_ALLOCATE_ON_PAGE = 1u << 12, PRE_FREED = 1u << 13, POOLED = 1u << 14,
  COMPACTION_WAS_ABORTED = 1u << 15, COMPACTION_WAS_ABORTED_FOR_TESTING = 1u << 16, SWEEP_TO_ITERATE = 1u << 17, INCREMENTAL_MARKING = 1u << 18
}
 
enum  ConcurrentSweepingState { kSweepingDone, kSweepingPending, kSweepingInProgress }
 
using Flags = uintptr_t
 

Public Member Functions

void SetOldGenerationPageFlags (bool is_marking)
 
void SetYoungGenerationPageFlags (bool is_marking)
 
void DiscardUnusedMemory (Address addr, size_t size)
 
Address address () const
 
base::Mutexmutex ()
 
bool Contains (Address addr)
 
bool ContainsLimit (Address addr)
 
void set_concurrent_sweeping_state (ConcurrentSweepingState state)
 
ConcurrentSweepingState concurrent_sweeping_state ()
 
bool SweepingDone ()
 
size_t size () const
 
void set_size (size_t size)
 
Heapheap () const
 
Heapsynchronized_heap ()
 
SkipListskip_list ()
 
void set_skip_list (SkipList *skip_list)
 
template<RememberedSetType type>
bool ContainsSlots ()
 
template<RememberedSetType type, AccessMode access_mode = AccessMode::ATOMIC>
SlotSetslot_set ()
 
template<RememberedSetType type, AccessMode access_mode = AccessMode::ATOMIC>
TypedSlotSettyped_slot_set ()
 
template<RememberedSetType type>
SlotSetAllocateSlotSet ()
 
template<RememberedSetType type>
void ReleaseSlotSet ()
 
template<RememberedSetType type>
TypedSlotSetAllocateTypedSlotSet ()
 
template<RememberedSetType type>
void ReleaseTypedSlotSet ()
 
InvalidatedSlots * AllocateInvalidatedSlots ()
 
void ReleaseInvalidatedSlots ()
 
void RegisterObjectWithInvalidatedSlots (HeapObject *object, int size)
 
void MoveObjectWithInvalidatedSlots (HeapObject *old_start, HeapObject *new_start)
 
bool RegisteredObjectWithInvalidatedSlots (HeapObject *object)
 
InvalidatedSlots * invalidated_slots ()
 
void ReleaseLocalTracker ()
 
void AllocateYoungGenerationBitmap ()
 
void ReleaseYoungGenerationBitmap ()
 
void AllocateMarkingBitmap ()
 
void ReleaseMarkingBitmap ()
 
Address area_start ()
 
Address area_end ()
 
size_t area_size ()
 
size_t CommittedPhysicalMemory ()
 
Address HighWaterMark ()
 
int progress_bar ()
 
void set_progress_bar (int progress_bar)
 
void ResetProgressBar ()
 
void IncrementExternalBackingStoreBytes (ExternalBackingStoreType type, size_t amount)
 
void DecrementExternalBackingStoreBytes (ExternalBackingStoreType type, size_t amount)
 
size_t ExternalBackingStoreBytes (ExternalBackingStoreType type)
 
uint32_t AddressToMarkbitIndex (Address addr) const
 
Address MarkbitIndexToAddress (uint32_t index) const
 
template<AccessMode access_mode = AccessMode::NON_ATOMIC>
void SetFlag (Flag flag)
 
template<AccessMode access_mode = AccessMode::NON_ATOMIC>
bool IsFlagSet (Flag flag)
 
void ClearFlag (Flag flag)
 
void SetFlags (uintptr_t flags, uintptr_t mask)
 
template<AccessMode access_mode = AccessMode::NON_ATOMIC>
uintptr_t GetFlags ()
 
bool NeverEvacuate ()
 
void MarkNeverEvacuate ()
 
bool CanAllocate ()
 
template<AccessMode access_mode = AccessMode::NON_ATOMIC>
bool IsEvacuationCandidate ()
 
template<AccessMode access_mode = AccessMode::NON_ATOMIC>
bool ShouldSkipEvacuationSlotRecording ()
 
Executability executable ()
 
bool InNewSpace ()
 
bool InToSpace ()
 
bool InFromSpace ()
 
bool InOldSpace () const
 
bool InLargeObjectSpace () const
 
bool IsInNewLargeObjectSpace () const
 
Spaceowner () const
 
void set_owner (Space *space)
 
bool IsPagedSpace () const
 
void InitializationMemoryFence ()
 
void SetReadAndExecutable ()
 
void SetReadAndWritable ()
 
base::ListNode< MemoryChunk > & list_node ()
 

Static Public Member Functions

static MemoryChunkFromAddress (Address a)
 
static MemoryChunkFromHeapObject (const HeapObject *o)
 
static MemoryChunkFromHeapObject (const HeapObjectPtr o)
 
static MemoryChunkFromAnyPointerAddress (Heap *heap, Address addr)
 
static void UpdateHighWaterMark (Address mark)
 
static void MoveExternalBackingStoreBytes (ExternalBackingStoreType type, MemoryChunk *from, MemoryChunk *to, size_t amount)
 

Static Public Attributes

static const Flags kPointersToHereAreInterestingMask
 
static const Flags kPointersFromHereAreInterestingMask
 
static const Flags kEvacuationCandidateMask = EVACUATION_CANDIDATE
 
static const Flags kIsInNewSpaceMask = IN_FROM_SPACE | IN_TO_SPACE
 
static const Flags kSkipEvacuationSlotsRecordingMask
 
static const intptr_t kAlignment
 
static const intptr_t kAlignmentMask = kAlignment - 1
 
static const intptr_t kSizeOffset = 0
 
static const intptr_t kFlagsOffset = kSizeOffset + kSizetSize
 
static const intptr_t kMarkBitmapOffset = kFlagsOffset + kPointerSize
 
static const intptr_t kReservationOffset = kMarkBitmapOffset + kPointerSize
 
static const size_t kHeaderSize
 
static const int kPageSize = 1 << kPageSizeBits
 
static const int kMaxWriteUnprotectCounter = 4
 

Protected Member Functions

void ReleaseAllocatedMemory ()
 
VirtualMemoryreserved_memory ()
 

Static Protected Member Functions

static MemoryChunkInitialize (Heap *heap, Address base, size_t size, Address area_start, Address area_end, Executability executable, Space *owner, VirtualMemory reservation)
 

Protected Attributes

size_t size_
 
uintptr_t flags_
 
Bitmapmarking_bitmap_
 
VirtualMemory reservation_
 
Address area_start_
 
Address area_end_
 
std::atomic< Space * > owner_
 
Heapheap_
 
intptr_t progress_bar_
 
std::atomic< intptr_t > live_byte_count_
 
SlotSetslot_set_ [NUMBER_OF_REMEMBERED_SET_TYPES]
 
TypedSlotSettyped_slot_set_ [NUMBER_OF_REMEMBERED_SET_TYPES]
 
InvalidatedSlots * invalidated_slots_
 
SkipListskip_list_
 
std::atomic< intptr_t > high_water_mark_
 
base::Mutexmutex_
 
std::atomic< intptr_t > concurrent_sweeping_
 
base::Mutexpage_protection_change_mutex_
 
uintptr_t write_unprotect_counter_
 
size_t allocated_bytes_
 
std::atomic< size_texternal_backing_store_bytes_ [kNumTypes]
 
size_t wasted_memory_
 
base::ListNode< MemoryChunklist_node_
 
FreeListCategorycategories_ [kNumberOfCategories]
 
LocalArrayBufferTrackerlocal_tracker_
 
std::atomic< intptr_t > young_generation_live_byte_count_
 
Bitmapyoung_generation_bitmap_
 

Friends

class ConcurrentMarkingState
 
class IncrementalMarkingState
 
class MajorAtomicMarkingState
 
class MajorMarkingState
 
class MajorNonAtomicMarkingState
 
class MemoryAllocator
 
class MemoryChunkValidator
 
class MinorMarkingState
 
class MinorNonAtomicMarkingState
 
class PagedSpace
 

Detailed Description

Definition at line 259 of file spaces.h.

Member Data Documentation

◆ kAlignment

const intptr_t v8::internal::MemoryChunk::kAlignment
static
Initial value:
=
(static_cast<uintptr_t>(1) << kPageSizeBits)

Definition at line 355 of file spaces.h.

◆ kPointersFromHereAreInterestingMask

const Flags v8::internal::MemoryChunk::kPointersFromHereAreInterestingMask
static
Initial value:
=
POINTERS_FROM_HERE_ARE_INTERESTING

Definition at line 334 of file spaces.h.

◆ kPointersToHereAreInterestingMask

const Flags v8::internal::MemoryChunk::kPointersToHereAreInterestingMask
static
Initial value:
=
POINTERS_TO_HERE_ARE_INTERESTING

Definition at line 331 of file spaces.h.

◆ kSkipEvacuationSlotsRecordingMask

const Flags v8::internal::MemoryChunk::kSkipEvacuationSlotsRecordingMask
static
Initial value:
=
kEvacuationCandidateMask | kIsInNewSpaceMask

Definition at line 341 of file spaces.h.


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