V8 Project
v8::internal::NewSpace Class Reference

#include <spaces.h>

+ Inheritance diagram for v8::internal::NewSpace:
+ Collaboration diagram for v8::internal::NewSpace:

Public Member Functions

 NewSpace (Heap *heap)
 
bool SetUp (int reserved_semispace_size_, int max_semi_space_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 Capacity ()
 
intptr_t TotalCapacity ()
 
intptr_t CommittedMemory ()
 
intptr_t MaximumCommittedMemory ()
 
size_t CommittedPhysicalMemory ()
 
intptr_t Available ()
 
int MaximumCapacity ()
 
bool IsAtMaximumCapacity ()
 
int InitialTotalCapacity ()
 
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 (AllocationResult 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 v8::internal::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 v8::internal::Malloced
void * operator new (size_t size)
 
void operator delete (void *p)
 

Private Member Functions

void UpdateAllocationInfo ()
 
MUST_USE_RESULT AllocationResult SlowAllocateRaw (int size_in_bytes)
 

Private Attributes

Address chunk_base_
 
uintptr_t chunk_size_
 
SemiSpace to_space_
 
SemiSpace from_space_
 
base::VirtualMemory reservation_
 
int pages_used_
 
Address start_
 
uintptr_t address_mask_
 
uintptr_t object_mask_
 
uintptr_t object_expected_
 
AllocationInfo allocation_info_
 
intptr_t inline_allocation_limit_step_
 
Address top_on_previous_step_
 
HistogramInfoallocated_histogram_
 
HistogramInfopromoted_histogram_
 

Friends

class SemiSpaceIterator
 

Additional Inherited Members

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

Detailed Description

Definition at line 2315 of file spaces.h.

Constructor & Destructor Documentation

◆ NewSpace()

v8::internal::NewSpace::NewSpace ( Heap heap)
inlineexplicit

Definition at line 2318 of file spaces.h.

2322  reservation_(),
SemiSpace to_space_
Definition: spaces.h:2558
base::VirtualMemory reservation_
Definition: spaces.h:2560
intptr_t inline_allocation_limit_step_
Definition: spaces.h:2577
SemiSpace from_space_
Definition: spaces.h:2559
Space(Heap *heap, AllocationSpace id, Executability executable)
Definition: spaces.h:818
Heap * heap() const
Definition: spaces.h:823
@ NOT_EXECUTABLE
Definition: globals.h:391

Member Function Documentation

◆ active_space()

SemiSpace* v8::internal::NewSpace::active_space ( )
inline

Definition at line 2548 of file spaces.h.

2548 { return &to_space_; }

References to_space_.

◆ AddFreshPage()

bool v8::internal::NewSpace::AddFreshPage ( )

Definition at line 1343 of file spaces.cc.

1343  {
1344  Address top = allocation_info_.top();
1346  // The current page is already empty. Don't try to make another.
1347 
1348  // We should only get here if someone asks to allocate more
1349  // than what can be stored in a single page.
1350  // TODO(gc): Change the limit on new-space allocation to prevent this
1351  // from happening (all such allocations should go directly to LOSpace).
1352  return false;
1353  }
1354  if (!to_space_.AdvancePage()) {
1355  // Failed to get a new page in to-space.
1356  return false;
1357  }
1358 
1359  // Clear remainder of current page.
1361  if (heap()->gc_state() == Heap::SCAVENGE) {
1363  }
1364 
1365  int remaining_in_page = static_cast<int>(limit - top);
1366  heap()->CreateFillerObjectAt(top, remaining_in_page);
1367  pages_used_++;
1369 
1370  return true;
1371 }
PromotionQueue * promotion_queue()
Definition: heap.h:753
void CreateFillerObjectAt(Address addr, int size)
Definition: heap.cc:3221
static bool IsAtStart(Address addr)
Definition: spaces.h:2009
static NewSpacePage * FromLimit(Address address_limit)
Definition: spaces.h:2031
AllocationInfo allocation_info_
Definition: spaces.h:2571
void UpdateAllocationInfo()
Definition: spaces.cc:1302
void SetNewLimit(Address limit)
Definition: heap.h:392
byte * Address
Definition: globals.h:101

References v8::internal::SemiSpace::AdvancePage(), allocation_info_, v8::internal::MemoryChunk::area_end(), v8::internal::Heap::CreateFillerObjectAt(), v8::internal::NewSpacePage::FromLimit(), v8::internal::Space::heap(), v8::internal::NewSpacePage::IsAtStart(), limit(), pages_used_, v8::internal::Heap::promotion_queue(), v8::internal::Heap::SCAVENGE, v8::internal::PromotionQueue::SetNewLimit(), to_space_, top(), and UpdateAllocationInfo().

Referenced by v8::internal::MarkCompactCollector::DiscoverAndEvacuateBlackObjectsOnPage(), and SlowAllocateRaw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ age_mark()

Address v8::internal::NewSpace::age_mark ( )
inline

Definition at line 2439 of file spaces.h.

2439 { return from_space_.age_mark(); }

References v8::internal::SemiSpace::age_mark(), and from_space_.

Referenced by v8::internal::Heap::ShouldBePromoted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allocation_limit_address()

Address* v8::internal::NewSpace::allocation_limit_address ( )
inline

Definition at line 2463 of file spaces.h.

2463  {
2465  }

References allocation_info_, and v8::internal::AllocationInfo::limit_address().

Referenced by v8::internal::Heap::NewSpaceAllocationLimitAddress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ allocation_top_address()

Address* v8::internal::NewSpace::allocation_top_address ( )
inline

Definition at line 2460 of file spaces.h.

2460 { return allocation_info_.top_address(); }

References allocation_info_, and v8::internal::AllocationInfo::top_address().

Referenced by v8::internal::Heap::NewSpaceAllocationTopAddress().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Available()

intptr_t v8::internal::NewSpace::Available ( )
inline

Definition at line 2400 of file spaces.h.

2400 { return Capacity() - Size(); }
intptr_t Capacity()
Definition: spaces.h:2371
virtual intptr_t Size()
Definition: spaces.h:2360

References Capacity(), and Size().

Referenced by v8::internal::Heap::Available(), v8::internal::StatisticsExtension::GetCounters(), v8::internal::Heap::IdleNotification(), v8::internal::Heap::PrintShortHeapStatistics(), and ReportStatistics().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bottom()

Address v8::internal::NewSpace::bottom ( )
inline

Definition at line 2436 of file spaces.h.

2436 { return to_space_.space_start(); }
Address space_start()
Definition: spaces.h:2098

References v8::internal::SemiSpace::space_start(), and to_space_.

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpace(), and v8::internal::GCTracer::Start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Capacity()

intptr_t v8::internal::NewSpace::Capacity ( )
inline

Definition at line 2371 of file spaces.h.

2371  {
2373  return (to_space_.TotalCapacity() / Page::kPageSize) *
2375  }
#define SLOW_DCHECK(condition)
Definition: checks.h:30
static const int kAreaSize
Definition: spaces.h:1991
static const int kPageSize
Definition: spaces.h:748

References from_space_, v8::internal::NewSpacePage::kAreaSize, v8::internal::Page::kPageSize, SLOW_DCHECK, to_space_, and v8::internal::SemiSpace::TotalCapacity().

Referenced by Available(), v8::internal::Heap::Capacity(), CommittedMemory(), v8::internal::Heap::IdleNotification(), v8::internal::Heap::NextGCIsLikelyToBeFull(), v8::internal::Heap::OldGenerationAllocationLimit(), and v8::internal::Heap::RecordStats().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ClearHistograms()

void v8::internal::NewSpace::ClearHistograms ( )

Definition at line 1851 of file spaces.cc.

1851  {
1852  for (int i = 0; i <= LAST_TYPE; i++) {
1853  allocated_histogram_[i].clear();
1854  promoted_histogram_[i].clear();
1855  }
1856 }
HistogramInfo * promoted_histogram_
Definition: spaces.h:2582
HistogramInfo * allocated_histogram_
Definition: spaces.h:2581

References allocated_histogram_, v8::internal::LAST_TYPE, and promoted_histogram_.

Referenced by CollectStatistics(), and v8::internal::Heap::ReportStatisticsBeforeGC().

+ Here is the caller graph for this function:

◆ CollectStatistics()

void v8::internal::NewSpace::CollectStatistics ( )

Definition at line 1862 of file spaces.cc.

1862  {
1863  ClearHistograms();
1864  SemiSpaceIterator it(this);
1865  for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next())
1866  RecordAllocation(obj);
1867 }
friend class SemiSpaceIterator
Definition: spaces.h:2586
void RecordAllocation(HeapObject *obj)
Definition: spaces.cc:1925
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL

References ClearHistograms(), v8::internal::SemiSpaceIterator::Next(), NULL, and RecordAllocation().

Referenced by v8::internal::Heap::ReportStatisticsAfterGC(), and v8::internal::Heap::ReportStatisticsBeforeGC().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CommitFromSpaceIfNeeded()

bool v8::internal::NewSpace::CommitFromSpaceIfNeeded ( )
inline

Definition at line 2534 of file spaces.h.

2534  {
2535  if (from_space_.is_committed()) return true;
2536  return from_space_.Commit();
2537  }

References v8::internal::SemiSpace::Commit(), from_space_, and v8::internal::SemiSpace::is_committed().

Referenced by v8::internal::Heap::EnsureFromSpaceIsCommitted().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CommittedMemory()

intptr_t v8::internal::NewSpace::CommittedMemory ( )
inline

Definition at line 2385 of file spaces.h.

2385  {
2386  if (from_space_.is_committed()) return 2 * Capacity();
2387  return TotalCapacity();
2388  }
intptr_t TotalCapacity()
Definition: spaces.h:2379

References Capacity(), from_space_, v8::internal::SemiSpace::is_committed(), and TotalCapacity().

Referenced by v8::internal::Heap::CommittedMemory(), CommittedPhysicalMemory(), v8::internal::StatisticsExtension::GetCounters(), and v8::internal::Heap::PrintShortHeapStatistics().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CommittedPhysicalMemory()

size_t v8::internal::NewSpace::CommittedPhysicalMemory ( )

Definition at line 1941 of file spaces.cc.

1941  {
1945  if (from_space_.is_committed()) {
1947  }
1948  return size;
1949 }
static void UpdateHighWaterMark(Address mark)
Definition: spaces-inl.h:189
intptr_t CommittedMemory()
Definition: spaces.h:2385
size_t CommittedPhysicalMemory()
Definition: spaces.cc:1526
enable harmony numeric enable harmony object literal extensions Optimize object size

References allocation_info_, CommittedMemory(), v8::internal::SemiSpace::CommittedPhysicalMemory(), from_space_, v8::base::VirtualMemory::HasLazyCommits(), v8::internal::SemiSpace::is_committed(), size, to_space_, and v8::internal::MemoryChunk::UpdateHighWaterMark().

Referenced by v8::internal::Heap::CommittedPhysicalMemory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Contains() [1/2]

bool v8::internal::NewSpace::Contains ( Address  a)
inline

Definition at line 2349 of file spaces.h.

2349  {
2350  return (reinterpret_cast<uintptr_t>(a) & address_mask_) ==
2351  reinterpret_cast<uintptr_t>(start_);
2352  }
uintptr_t address_mask_
Definition: spaces.h:2565

References address_mask_, and start_.

Referenced by v8::internal::StoreBuffer::EnterDirectlyIntoStoreBuffer(), INLINE(), v8::internal::Heap::InNewSpace(), v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::RecordCopiedObject(), and v8::internal::SeqString::Truncate().

+ Here is the caller graph for this function:

◆ Contains() [2/2]

bool v8::internal::NewSpace::Contains ( Object o)
inline

Definition at line 2354 of file spaces.h.

2354  {
2355  Address a = reinterpret_cast<Address>(o);
2356  return (reinterpret_cast<uintptr_t>(a) & object_mask_) == object_expected_;
2357  }
uintptr_t object_mask_
Definition: spaces.h:2566
uintptr_t object_expected_
Definition: spaces.h:2567

References object_expected_, and object_mask_.

◆ Flip()

void v8::internal::NewSpace::Flip ( )

Definition at line 1257 of file spaces.cc.

static void Swap(SemiSpace *from, SemiSpace *to)
Definition: spaces.cc:1635

References from_space_, v8::internal::SemiSpace::Swap(), and to_space_.

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpace(), and v8::internal::Heap::Scavenge().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FromSpaceContains() [1/2]

bool v8::internal::NewSpace::FromSpaceContains ( Address  address)
inline

Definition at line 2494 of file spaces.h.

2494  {
2495  return from_space_.Contains(address);
2496  }
bool Contains(Address a)
Definition: spaces.h:2128

References v8::internal::SemiSpace::Contains(), and from_space_.

Referenced by v8::internal::Heap::InFromSpace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FromSpaceContains() [2/2]

bool v8::internal::NewSpace::FromSpaceContains ( Object o)
inline

Definition at line 2502 of file spaces.h.

2502 { return from_space_.Contains(o); }

References v8::internal::SemiSpace::Contains(), and from_space_.

+ Here is the call graph for this function:

◆ FromSpaceEnd()

Address v8::internal::NewSpace::FromSpaceEnd ( )
inline

Definition at line 2485 of file spaces.h.

2485 { return from_space_.space_end(); }

References from_space_, and v8::internal::SemiSpace::space_end().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FromSpacePageHigh()

Address v8::internal::NewSpace::FromSpacePageHigh ( )
inline

Definition at line 2483 of file spaces.h.

2483 { return from_space_.page_high(); }

References from_space_, and v8::internal::SemiSpace::page_high().

Referenced by v8::internal::MarkCompactCollector::MarkLiveObjects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FromSpacePageLow()

Address v8::internal::NewSpace::FromSpacePageLow ( )
inline

Definition at line 2482 of file spaces.h.

2482 { return from_space_.page_low(); }

References from_space_, and v8::internal::SemiSpace::page_low().

Referenced by v8::internal::MarkCompactCollector::MarkLiveObjects().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FromSpaceStart()

Address v8::internal::NewSpace::FromSpaceStart ( )
inline

Definition at line 2484 of file spaces.h.

2484 { return from_space_.space_start(); }

References from_space_, and v8::internal::SemiSpace::space_start().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Grow()

void v8::internal::NewSpace::Grow ( )

Definition at line 1260 of file spaces.cc.

1260  {
1261  // Double the semispace size but only up to maximum capacity.
1263  int new_capacity =
1264  Min(MaximumCapacity(), 2 * static_cast<int>(TotalCapacity()));
1265  if (to_space_.GrowTo(new_capacity)) {
1266  // Only grow from space if we managed to grow to-space.
1267  if (!from_space_.GrowTo(new_capacity)) {
1268  // If we managed to grow to-space but couldn't grow from-space,
1269  // attempt to shrink to-space.
1271  // We are in an inconsistent state because we could not
1272  // commit/uncommit memory from new space.
1273  V8::FatalProcessOutOfMemory("Failed to grow new space.");
1274  }
1275  }
1276  }
1278 }
bool ShrinkTo(int new_capacity)
Definition: spaces.cc:1572
bool GrowTo(int new_capacity)
Definition: spaces.cc:1537
static void FatalProcessOutOfMemory(const char *location, bool take_snapshot=false)
#define DCHECK(condition)
Definition: logging.h:205
static LifetimePosition Min(LifetimePosition a, LifetimePosition b)
#define DCHECK_SEMISPACE_ALLOCATION_INFO(info, space)
Definition: spaces.h:2611

References allocation_info_, DCHECK, DCHECK_SEMISPACE_ALLOCATION_INFO, v8::internal::V8::FatalProcessOutOfMemory(), from_space_, v8::internal::SemiSpace::GrowTo(), MaximumCapacity(), v8::internal::Min(), v8::internal::SemiSpace::ShrinkTo(), to_space_, v8::internal::SemiSpace::TotalCapacity(), and TotalCapacity().

Referenced by v8::internal::Heap::CheckNewSpaceExpansionCriteria().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasBeenSetUp()

bool v8::internal::NewSpace::HasBeenSetUp ( )
inline

Definition at line 2333 of file spaces.h.

2333  {
2335  }

References from_space_, v8::internal::SemiSpace::HasBeenSetUp(), and to_space_.

+ Here is the call graph for this function:

◆ InitialTotalCapacity()

int v8::internal::NewSpace::InitialTotalCapacity ( )
inline

Definition at line 2412 of file spaces.h.

2412  {
2416  }

References DCHECK, from_space_, v8::internal::SemiSpace::InitialTotalCapacity(), and to_space_.

Referenced by Shrink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ INLINE() [1/3]

v8::internal::NewSpace::INLINE ( Address   MarkbitIndexToAddressuint32_t index)
inline

Definition at line 2455 of file spaces.h.

2455  {
2456  return reinterpret_cast<Address>(index << kPointerSizeLog2);
2457  }
const int kPointerSizeLog2
Definition: globals.h:147

References v8::internal::kPointerSizeLog2.

◆ INLINE() [2/3]

MUST_USE_RESULT v8::internal::NewSpace::INLINE ( AllocationResult   AllocateRawint size_in_bytes)

◆ INLINE() [3/3]

v8::internal::NewSpace::INLINE ( uint32_t   AddressToMarkbitIndexAddress addr)
inline

Definition at line 2448 of file spaces.h.

2448  {
2449  DCHECK(Contains(addr));
2451  IsAligned(OffsetFrom(addr) - 1, kPointerSize));
2452  return static_cast<uint32_t>(addr - start_) >> kPointerSizeLog2;
2453  }
bool Contains(Address a)
Definition: spaces.h:2349
intptr_t OffsetFrom(T x)
Definition: macros.h:383
const int kPointerSize
Definition: globals.h:129
bool IsAligned(T value, U alignment)
Definition: utils.h:123

References Contains(), DCHECK, v8::internal::IsAligned(), v8::internal::kPointerSize, v8::internal::kPointerSizeLog2, OffsetFrom(), and start_.

+ Here is the call graph for this function:

◆ inline_allocation_limit_step()

intptr_t v8::internal::NewSpace::inline_allocation_limit_step ( )
inline

Definition at line 2544 of file spaces.h.

2544  {
2546  }

References inline_allocation_limit_step_.

Referenced by v8::internal::Heap::Scavenge(), and UpdateInlineAllocationLimit().

+ Here is the caller graph for this function:

◆ IsAtMaximumCapacity()

bool v8::internal::NewSpace::IsAtMaximumCapacity ( )
inline

Definition at line 2409 of file spaces.h.

2409 { return TotalCapacity() == MaximumCapacity(); }

References MaximumCapacity(), and TotalCapacity().

Referenced by v8::internal::Heap::DeoptMaybeTenuredAllocationSites(), and v8::internal::Heap::GarbageCollectionPrologue().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ limit()

Address v8::internal::NewSpace::limit ( )
inline

Definition at line 2430 of file spaces.h.

2430  {
2432  return allocation_info_.limit();
2433  }
bool ContainsLimit(Address addr)
Definition: spaces.h:355
NewSpacePage * current_page()
Definition: spaces.h:2151

References allocation_info_, v8::internal::MemoryChunk::ContainsLimit(), v8::internal::SemiSpace::current_page(), DCHECK, and to_space_.

Referenced by AddFreshPage(), and v8::internal::Heap::EnsureFillerObjectAtTop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LowerInlineAllocationLimit()

void v8::internal::NewSpace::LowerInlineAllocationLimit ( intptr_t  step)
inline

Definition at line 2473 of file spaces.h.

2473  {
2477  }
Address top_on_previous_step_
Definition: spaces.h:2579
void UpdateInlineAllocationLimit(int size_in_bytes)
Definition: spaces.cc:1323

References allocation_info_, inline_allocation_limit_step_, top_on_previous_step_, and UpdateInlineAllocationLimit().

Referenced by v8::internal::IncrementalMarking::Abort(), v8::internal::IncrementalMarking::Finalize(), v8::internal::Heap::Scavenge(), and v8::internal::IncrementalMarking::Start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mask()

uintptr_t v8::internal::NewSpace::mask ( )
inline

Definition at line 2446 of file spaces.h.

2446 { return address_mask_; }

References address_mask_.

Referenced by v8::internal::Heap::NewSpaceMask().

+ Here is the caller graph for this function:

◆ MaximumCapacity()

int v8::internal::NewSpace::MaximumCapacity ( )
inline

Definition at line 2403 of file spaces.h.

2403  {
2407  }

References DCHECK, from_space_, v8::internal::SemiSpace::MaximumTotalCapacity(), and to_space_.

Referenced by v8::internal::Heap::CheckNewSpaceExpansionCriteria(), Grow(), and IsAtMaximumCapacity().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MaximumCommittedMemory()

intptr_t v8::internal::NewSpace::MaximumCommittedMemory ( )
inline

Definition at line 2391 of file spaces.h.

2391  {
2394  }
size_t MaximumCommittedMemory()
Definition: spaces.h:2182

References from_space_, v8::internal::SemiSpace::MaximumCommittedMemory(), and to_space_.

Referenced by v8::internal::Heap::TearDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RecordAllocation()

void v8::internal::NewSpace::RecordAllocation ( HeapObject obj)

Definition at line 1925 of file spaces.cc.

1925  {
1926  InstanceType type = obj->map()->instance_type();
1927  DCHECK(0 <= type && type <= LAST_TYPE);
1928  allocated_histogram_[type].increment_number(1);
1929  allocated_histogram_[type].increment_bytes(obj->Size());
1930 }

References allocated_histogram_, DCHECK, v8::internal::Map::instance_type(), v8::internal::LAST_TYPE, v8::internal::HeapObject::map(), and v8::internal::HeapObject::Size().

Referenced by CollectStatistics(), and v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::RecordCopiedObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RecordPromotion()

void v8::internal::NewSpace::RecordPromotion ( HeapObject obj)

Definition at line 1933 of file spaces.cc.

1933  {
1934  InstanceType type = obj->map()->instance_type();
1935  DCHECK(0 <= type && type <= LAST_TYPE);
1936  promoted_histogram_[type].increment_number(1);
1937  promoted_histogram_[type].increment_bytes(obj->Size());
1938 }

References DCHECK, v8::internal::Map::instance_type(), v8::internal::LAST_TYPE, v8::internal::HeapObject::map(), promoted_histogram_, and v8::internal::HeapObject::Size().

Referenced by v8::internal::ScavengingVisitor< marks_handling, logging_and_profiling_mode >::RecordCopiedObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ReportStatistics()

void v8::internal::NewSpace::ReportStatistics ( )

Definition at line 1897 of file spaces.cc.

1897  {
1898 #ifdef DEBUG
1899  if (FLAG_heap_stats) {
1900  float pct = static_cast<float>(Available()) / TotalCapacity();
1901  PrintF(" capacity: %" V8_PTR_PREFIX
1902  "d"
1903  ", available: %" V8_PTR_PREFIX "d, %%%d\n",
1904  TotalCapacity(), Available(), static_cast<int>(pct * 100));
1905  PrintF("\n Object Histogram:\n");
1906  for (int i = 0; i <= LAST_TYPE; i++) {
1907  if (allocated_histogram_[i].number() > 0) {
1908  PrintF(" %-34s%10d (%10d bytes)\n", allocated_histogram_[i].name(),
1909  allocated_histogram_[i].number(),
1910  allocated_histogram_[i].bytes());
1911  }
1912  }
1913  PrintF("\n");
1914  }
1915 #endif // DEBUG
1916 
1917  if (FLAG_log_gc) {
1918  Isolate* isolate = heap()->isolate();
1919  DoReportStatistics(isolate, allocated_histogram_, "allocated");
1920  DoReportStatistics(isolate, promoted_histogram_, "promoted");
1921  }
1922 }
Isolate * isolate()
Definition: heap-inl.h:589
intptr_t Available()
Definition: spaces.h:2400
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
#define V8_PTR_PREFIX
Definition: macros.h:360
void PrintF(const char *format,...)
Definition: utils.cc:80
static void DoReportStatistics(Isolate *isolate, HistogramInfo *info, const char *description)
Definition: spaces.cc:1870

References allocated_histogram_, Available(), v8::internal::DoReportStatistics(), v8::internal::Space::heap(), v8::internal::Heap::isolate(), v8::internal::LAST_TYPE, name, v8::internal::PrintF(), promoted_histogram_, TotalCapacity(), and V8_PTR_PREFIX.

Referenced by v8::internal::Heap::ReportStatisticsAfterGC(), and v8::internal::Heap::ReportStatisticsBeforeGC().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ResetAllocationInfo()

void v8::internal::NewSpace::ResetAllocationInfo ( )

Definition at line 1311 of file spaces.cc.

1311  {
1312  to_space_.Reset();
1314  pages_used_ = 0;
1315  // Clear all mark-bits in the to-space.
1316  NewSpacePageIterator it(&to_space_);
1317  while (it.has_next()) {
1318  Bitmap::Clear(it.next());
1319  }
1320 }
static void Clear(MemoryChunk *chunk)
Definition: spaces-inl.h:21

References v8::internal::Bitmap::Clear(), pages_used_, v8::internal::SemiSpace::Reset(), to_space_, and UpdateAllocationInfo().

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpace(), v8::internal::Heap::Scavenge(), and SetUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_age_mark()

void v8::internal::NewSpace::set_age_mark ( Address  mark)
inline

Definition at line 2441 of file spaces.h.

2441 { to_space_.set_age_mark(mark); }
void set_age_mark(Address mark)
Definition: spaces.cc:1664

References v8::internal::SemiSpace::set_age_mark(), and to_space_.

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpace(), and v8::internal::Heap::Scavenge().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set_top()

void v8::internal::NewSpace::set_top ( Address  top)
inline

Definition at line 2424 of file spaces.h.

2424  {
2426  allocation_info_.set_top(top);
2427  }

References allocation_info_, v8::internal::MemoryChunk::ContainsLimit(), v8::internal::SemiSpace::current_page(), DCHECK, to_space_, and top().

Referenced by v8::internal::SeqString::Truncate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetUp()

bool v8::internal::NewSpace::SetUp ( int  reserved_semispace_size_,
int  max_semi_space_size 
)

Definition at line 1175 of file spaces.cc.

1176  {
1177  // Set up new space based on the preallocated memory block defined by
1178  // start and size. The provided space is divided into two semi-spaces.
1179  // To support fast containment testing in the new space, the size of
1180  // this chunk must be a power of two and it must be aligned to its size.
1181  int initial_semispace_capacity = heap()->InitialSemiSpaceSize();
1182 
1183  size_t size = 2 * reserved_semispace_capacity;
1185  size, size, &reservation_);
1186  if (base == NULL) return false;
1187 
1188  chunk_base_ = base;
1189  chunk_size_ = static_cast<uintptr_t>(size);
1190  LOG(heap()->isolate(), NewEvent("InitialChunk", chunk_base_, chunk_size_));
1191 
1192  DCHECK(initial_semispace_capacity <= maximum_semispace_capacity);
1193  DCHECK(base::bits::IsPowerOfTwo32(maximum_semispace_capacity));
1194 
1195  // Allocate and set up the histogram arrays if necessary.
1196  allocated_histogram_ = NewArray<HistogramInfo>(LAST_TYPE + 1);
1197  promoted_histogram_ = NewArray<HistogramInfo>(LAST_TYPE + 1);
1198 
1199 #define SET_NAME(name) \
1200  allocated_histogram_[name].set_name(#name); \
1201  promoted_histogram_[name].set_name(#name);
1203 #undef SET_NAME
1204 
1205  DCHECK(reserved_semispace_capacity == heap()->ReservedSemiSpaceSize());
1206  DCHECK(static_cast<intptr_t>(chunk_size_) >=
1207  2 * heap()->ReservedSemiSpaceSize());
1208  DCHECK(IsAddressAligned(chunk_base_, 2 * reserved_semispace_capacity, 0));
1209 
1210  to_space_.SetUp(chunk_base_, initial_semispace_capacity,
1211  maximum_semispace_capacity);
1212  from_space_.SetUp(chunk_base_ + reserved_semispace_capacity,
1213  initial_semispace_capacity, maximum_semispace_capacity);
1214  if (!to_space_.Commit()) {
1215  return false;
1216  }
1217  DCHECK(!from_space_.is_committed()); // No need to use memory yet.
1218 
1219  start_ = chunk_base_;
1220  address_mask_ = ~(2 * reserved_semispace_capacity - 1);
1222  object_expected_ = reinterpret_cast<uintptr_t>(start_) | kHeapObjectTag;
1223 
1225 
1226  return true;
1227 }
int InitialSemiSpaceSize()
Definition: heap.h:554
MemoryAllocator * memory_allocator()
Definition: isolate.h:883
Address ReserveAlignedMemory(size_t requested, size_t alignment, base::VirtualMemory *controller)
Definition: spaces.cc:345
uintptr_t chunk_size_
Definition: spaces.h:2555
void ResetAllocationInfo()
Definition: spaces.cc:1311
void SetUp(Address start, int initial_capacity, int maximum_capacity)
Definition: spaces.cc:1460
#define LOG(isolate, Call)
Definition: log.h:69
bool IsPowerOfTwo32(uint32_t value)
Definition: bits.h:77
const intptr_t kHeapObjectTagMask
Definition: v8.h:5739
bool IsAddressAligned(Address addr, intptr_t alignment, int offset=0)
Definition: utils.h:129
const int kHeapObjectTag
Definition: v8.h:5737
#define INSTANCE_TYPE_LIST(V)
Definition: objects.h:339
#define SET_NAME(name)

References address_mask_, allocated_histogram_, chunk_base_, chunk_size_, v8::internal::SemiSpace::Commit(), DCHECK, from_space_, v8::internal::Space::heap(), v8::internal::Heap::InitialSemiSpaceSize(), INSTANCE_TYPE_LIST, v8::internal::SemiSpace::is_committed(), v8::internal::IsAddressAligned(), v8::internal::Heap::isolate(), v8::base::bits::IsPowerOfTwo32(), v8::internal::kHeapObjectTag, v8::internal::kHeapObjectTagMask, v8::internal::LAST_TYPE, LOG, v8::internal::Isolate::memory_allocator(), NULL, object_expected_, object_mask_, promoted_histogram_, reservation_, v8::internal::MemoryAllocator::ReserveAlignedMemory(), ResetAllocationInfo(), SET_NAME, v8::internal::SemiSpace::SetUp(), size, start_, and to_space_.

Referenced by v8::internal::Heap::SetUp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Shrink()

void v8::internal::NewSpace::Shrink ( )

Definition at line 1281 of file spaces.cc.

1281  {
1282  int new_capacity = Max(InitialTotalCapacity(), 2 * SizeAsInt());
1283  int rounded_new_capacity = RoundUp(new_capacity, Page::kPageSize);
1284  if (rounded_new_capacity < TotalCapacity() &&
1285  to_space_.ShrinkTo(rounded_new_capacity)) {
1286  // Only shrink from-space if we managed to shrink to-space.
1287  from_space_.Reset();
1288  if (!from_space_.ShrinkTo(rounded_new_capacity)) {
1289  // If we managed to shrink to-space but couldn't shrink from
1290  // space, attempt to grow to-space again.
1292  // We are in an inconsistent state because we could not
1293  // commit/uncommit memory from new space.
1294  V8::FatalProcessOutOfMemory("Failed to shrink new space.");
1295  }
1296  }
1297  }
1299 }
int InitialTotalCapacity()
Definition: spaces.h:2412
static LifetimePosition Max(LifetimePosition a, LifetimePosition b)
static void RoundUp(Vector< char > buffer, int *length, int *decimal_point)
Definition: fixed-dtoa.cc:171

References allocation_info_, DCHECK_SEMISPACE_ALLOCATION_INFO, v8::internal::V8::FatalProcessOutOfMemory(), from_space_, v8::internal::SemiSpace::GrowTo(), InitialTotalCapacity(), v8::internal::Page::kPageSize, v8::internal::Max(), v8::internal::SemiSpace::Reset(), v8::internal::RoundUp(), v8::internal::SemiSpace::ShrinkTo(), SizeAsInt(), to_space_, v8::internal::SemiSpace::TotalCapacity(), and TotalCapacity().

Referenced by v8::internal::Heap::AdvanceIdleIncrementalMarking(), and v8::internal::Heap::CollectAllAvailableGarbage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Size()

virtual intptr_t v8::internal::NewSpace::Size ( )
inlinevirtual

Implements v8::internal::Space.

Definition at line 2360 of file spaces.h.

2360  {
2362  static_cast<int>(top() - to_space_.page_low());
2363  }

References v8::internal::NewSpacePage::kAreaSize, v8::internal::SemiSpace::page_low(), pages_used_, to_space_, and top().

Referenced by Available(), v8::internal::StatisticsExtension::GetCounters(), v8::internal::Heap::PrintShortHeapStatistics(), v8::internal::Heap::Scavenge(), v8::internal::Heap::SelectGarbageCollector(), and SizeAsInt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SizeAsInt()

int v8::internal::NewSpace::SizeAsInt ( )
inline

Definition at line 2368 of file spaces.h.

2368 { return static_cast<int>(Size()); }

References Size().

Referenced by v8::internal::Heap::PerformGarbageCollection(), v8::internal::Heap::RecordStats(), and Shrink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SlowAllocateRaw()

AllocationResult v8::internal::NewSpace::SlowAllocateRaw ( int  size_in_bytes)
private

Definition at line 1374 of file spaces.cc.

1374  {
1375  Address old_top = allocation_info_.top();
1376  Address high = to_space_.page_high();
1377  if (allocation_info_.limit() < high) {
1378  // Either the limit has been lowered because linear allocation was disabled
1379  // or because incremental marking wants to get a chance to do a step. Set
1380  // the new limit accordingly.
1381  Address new_top = old_top + size_in_bytes;
1382  int bytes_allocated = static_cast<int>(new_top - top_on_previous_step_);
1383  heap()->incremental_marking()->Step(bytes_allocated,
1385  UpdateInlineAllocationLimit(size_in_bytes);
1386  top_on_previous_step_ = new_top;
1387  return AllocateRaw(size_in_bytes);
1388  } else if (AddFreshPage()) {
1389  // Switched to new page. Try allocating again.
1390  int bytes_allocated = static_cast<int>(old_top - top_on_previous_step_);
1391  heap()->incremental_marking()->Step(bytes_allocated,
1394  return AllocateRaw(size_in_bytes);
1395  } else {
1396  return AllocationResult::Retry();
1397  }
1398 }
static AllocationResult Retry(AllocationSpace space=NEW_SPACE)
Definition: spaces.h:1616
IncrementalMarking * incremental_marking()
Definition: heap.h:1205
void Step(intptr_t allocated, CompletionAction action, bool force_marking=false)

References AddFreshPage(), allocation_info_, v8::internal::IncrementalMarking::GC_VIA_STACK_GUARD, v8::internal::Space::heap(), v8::internal::Heap::incremental_marking(), v8::internal::SemiSpace::page_high(), v8::internal::SemiSpace::page_low(), v8::internal::AllocationResult::Retry(), v8::internal::IncrementalMarking::Step(), to_space_, top_on_previous_step_, and UpdateInlineAllocationLimit().

+ Here is the call graph for this function:

◆ start()

Address v8::internal::NewSpace::start ( )
inline

Definition at line 2445 of file spaces.h.

2445 { return start_; }

References start_.

Referenced by v8::internal::Heap::NewSpaceStart().

+ Here is the caller graph for this function:

◆ TearDown()

void v8::internal::NewSpace::TearDown ( )

Definition at line 1230 of file spaces.cc.

1230  {
1231  if (allocated_histogram_) {
1234  }
1235  if (promoted_histogram_) {
1238  }
1239 
1240  start_ = NULL;
1241  allocation_info_.set_top(NULL);
1242  allocation_info_.set_limit(NULL);
1243 
1244  to_space_.TearDown();
1246 
1247  LOG(heap()->isolate(), DeleteEvent("InitialChunk", chunk_base_));
1248 
1251  NOT_EXECUTABLE);
1252  chunk_base_ = NULL;
1253  chunk_size_ = 0;
1254 }
void FreeMemory(base::VirtualMemory *reservation, Executability executable)
Definition: spaces.cc:295
void DeleteArray(T *array)
Definition: allocation.h:68

References allocated_histogram_, allocation_info_, chunk_base_, chunk_size_, DCHECK, v8::internal::DeleteArray(), v8::internal::MemoryAllocator::FreeMemory(), from_space_, v8::internal::Space::heap(), v8::internal::Heap::isolate(), v8::base::VirtualMemory::IsReserved(), LOG, v8::internal::Isolate::memory_allocator(), v8::internal::NOT_EXECUTABLE, NULL, promoted_histogram_, reservation_, start_, v8::internal::SemiSpace::TearDown(), and to_space_.

Referenced by v8::internal::Heap::TearDown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ top()

◆ ToSpaceContains() [1/2]

bool v8::internal::NewSpace::ToSpaceContains ( Address  address)
inline

Definition at line 2491 of file spaces.h.

2491  {
2492  return to_space_.Contains(address);
2493  }

References v8::internal::SemiSpace::Contains(), and to_space_.

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToSpaceContains() [2/2]

bool v8::internal::NewSpace::ToSpaceContains ( Object o)
inline

Definition at line 2501 of file spaces.h.

2501 { return to_space_.Contains(o); }

References v8::internal::SemiSpace::Contains(), and to_space_.

+ Here is the call graph for this function:

◆ ToSpaceEnd()

Address v8::internal::NewSpace::ToSpaceEnd ( )
inline

Definition at line 2489 of file spaces.h.

2489 { return to_space_.space_end(); }

References v8::internal::SemiSpace::space_end(), and to_space_.

Referenced by v8::internal::PromotionQueue::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToSpaceStart()

Address v8::internal::NewSpace::ToSpaceStart ( )
inline

Definition at line 2488 of file spaces.h.

2488 { return to_space_.space_start(); }

References v8::internal::SemiSpace::space_start(), and to_space_.

Referenced by v8::internal::PromotionQueue::Initialize(), and v8::internal::Heap::Scavenge().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TotalCapacity()

intptr_t v8::internal::NewSpace::TotalCapacity ( )
inline

Definition at line 2379 of file spaces.h.

2379  {
2381  return to_space_.TotalCapacity();
2382  }

References DCHECK, from_space_, to_space_, and v8::internal::SemiSpace::TotalCapacity().

Referenced by v8::internal::Heap::CheckNewSpaceExpansionCriteria(), CommittedMemory(), Grow(), IsAtMaximumCapacity(), ReportStatistics(), and Shrink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UncommitFromSpace()

bool v8::internal::NewSpace::UncommitFromSpace ( )
inline

Definition at line 2539 of file spaces.h.

2539  {
2540  if (!from_space_.is_committed()) return true;
2541  return from_space_.Uncommit();
2542  }

References from_space_, v8::internal::SemiSpace::is_committed(), and v8::internal::SemiSpace::Uncommit().

Referenced by v8::internal::Heap::UncommitFromSpace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateAllocationInfo()

void v8::internal::NewSpace::UpdateAllocationInfo ( )
private

Definition at line 1302 of file spaces.cc.

References allocation_info_, DCHECK_SEMISPACE_ALLOCATION_INFO, v8::internal::SemiSpace::page_high(), v8::internal::SemiSpace::page_low(), to_space_, v8::internal::MemoryChunk::UpdateHighWaterMark(), and UpdateInlineAllocationLimit().

Referenced by AddFreshPage(), and ResetAllocationInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateInlineAllocationLimit()

void v8::internal::NewSpace::UpdateInlineAllocationLimit ( int  size_in_bytes)

Definition at line 1323 of file spaces.cc.

1323  {
1324  if (heap()->inline_allocation_disabled()) {
1325  // Lowest limit when linear allocation was disabled.
1326  Address high = to_space_.page_high();
1327  Address new_top = allocation_info_.top() + size_in_bytes;
1328  allocation_info_.set_limit(Min(new_top, high));
1329  } else if (inline_allocation_limit_step() == 0) {
1330  // Normal limit is the end of the current page.
1331  allocation_info_.set_limit(to_space_.page_high());
1332  } else {
1333  // Lower limit during incremental marking.
1334  Address high = to_space_.page_high();
1335  Address new_top = allocation_info_.top() + size_in_bytes;
1336  Address new_limit = new_top + inline_allocation_limit_step_;
1337  allocation_info_.set_limit(Min(new_limit, high));
1338  }
1340 }
intptr_t inline_allocation_limit_step()
Definition: spaces.h:2544

References allocation_info_, DCHECK_SEMISPACE_ALLOCATION_INFO, v8::internal::Space::heap(), inline_allocation_limit_step(), inline_allocation_limit_step_, v8::internal::Min(), v8::internal::SemiSpace::page_high(), and to_space_.

Referenced by v8::internal::Heap::DisableInlineAllocation(), v8::internal::Heap::EnableInlineAllocation(), LowerInlineAllocationLimit(), SlowAllocateRaw(), and UpdateAllocationInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ SemiSpaceIterator

friend class SemiSpaceIterator
friend

Definition at line 2586 of file spaces.h.

Member Data Documentation

◆ address_mask_

uintptr_t v8::internal::NewSpace::address_mask_
private

Definition at line 2565 of file spaces.h.

Referenced by Contains(), mask(), and SetUp().

◆ allocated_histogram_

HistogramInfo* v8::internal::NewSpace::allocated_histogram_
private

Definition at line 2581 of file spaces.h.

Referenced by ClearHistograms(), RecordAllocation(), ReportStatistics(), SetUp(), and TearDown().

◆ allocation_info_

◆ chunk_base_

Address v8::internal::NewSpace::chunk_base_
private

Definition at line 2554 of file spaces.h.

Referenced by SetUp(), and TearDown().

◆ chunk_size_

uintptr_t v8::internal::NewSpace::chunk_size_
private

Definition at line 2555 of file spaces.h.

Referenced by SetUp(), and TearDown().

◆ from_space_

◆ inline_allocation_limit_step_

intptr_t v8::internal::NewSpace::inline_allocation_limit_step_
private

◆ object_expected_

uintptr_t v8::internal::NewSpace::object_expected_
private

Definition at line 2567 of file spaces.h.

Referenced by Contains(), and SetUp().

◆ object_mask_

uintptr_t v8::internal::NewSpace::object_mask_
private

Definition at line 2566 of file spaces.h.

Referenced by Contains(), and SetUp().

◆ pages_used_

int v8::internal::NewSpace::pages_used_
private

Definition at line 2561 of file spaces.h.

Referenced by AddFreshPage(), ResetAllocationInfo(), and Size().

◆ promoted_histogram_

HistogramInfo* v8::internal::NewSpace::promoted_histogram_
private

Definition at line 2582 of file spaces.h.

Referenced by ClearHistograms(), RecordPromotion(), ReportStatistics(), SetUp(), and TearDown().

◆ reservation_

base::VirtualMemory v8::internal::NewSpace::reservation_
private

Definition at line 2560 of file spaces.h.

Referenced by SetUp(), and TearDown().

◆ start_

Address v8::internal::NewSpace::start_
private

Definition at line 2564 of file spaces.h.

Referenced by Contains(), INLINE(), SetUp(), start(), and TearDown().

◆ to_space_

◆ top_on_previous_step_

Address v8::internal::NewSpace::top_on_previous_step_
private

Definition at line 2579 of file spaces.h.

Referenced by LowerInlineAllocationLimit(), and SlowAllocateRaw().


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