V8 Project
|
#include <spaces.h>
Static Public Member Functions | |
static intptr_t | ObjectSizeFor (intptr_t chunk_size) |
![]() | |
static void | FatalProcessOutOfMemory () |
static void * | New (size_t size) |
static void | Delete (void *p) |
Private Attributes | |
intptr_t | max_capacity_ |
intptr_t | maximum_committed_ |
LargePage * | first_page_ |
intptr_t | size_ |
int | page_count_ |
intptr_t | objects_size_ |
HashMap | chunk_map_ |
Friends | |
class | LargeObjectIterator |
v8::internal::LargeObjectSpace::LargeObjectSpace | ( | Heap * | heap, |
intptr_t | max_capacity, | ||
AllocationSpace | id | ||
) |
Definition at line 2797 of file spaces.cc.
|
inlinevirtual |
AllocationResult v8::internal::LargeObjectSpace::AllocateRaw | ( | int | object_size, |
Executability | executable | ||
) |
Definition at line 2834 of file spaces.cc.
References v8::internal::HeapObject::address(), v8::internal::MemoryAllocator::AllocateLargePage(), v8::internal::MemoryChunk::area_size(), CanAllocateSize(), chunk_map_, DCHECK, v8::internal::Space::executable(), first_page_, v8::internal::Smi::FromInt(), v8::internal::LargePage::GetObject(), v8::internal::Space::heap(), v8::internal::Space::identity(), v8::internal::Heap::incremental_marking(), v8::internal::Heap::isolate(), v8::internal::MemoryChunk::kAlignment, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), maximum_committed_, v8::internal::Isolate::memory_allocator(), MSAN_ALLOCATED_UNINITIALIZED_MEMORY, NULL, objects_size_, v8::internal::IncrementalMarking::OldSpaceStep(), page_count_, v8::internal::AllocationResult::Retry(), v8::internal::LargePage::set_next_page(), v8::internal::Heap::ShouldZapGarbage(), v8::internal::MemoryChunk::size(), and size_.
Referenced by v8::internal::Deserializer::Allocate(), v8::internal::Heap::AllocateCode(), and v8::internal::Heap::AllocateRaw().
|
inline |
Definition at line 298 of file spaces-inl.h.
References v8::internal::Space::heap(), and ObjectSizeFor().
Referenced by v8::internal::StatisticsExtension::GetCounters(), and v8::internal::Heap::PrintShortHeapStatistics().
Definition at line 2735 of file spaces.h.
References max_capacity_, size, and Size().
Referenced by AllocateRaw(), and v8::internal::Heap::ReserveSpace().
|
inline |
Definition at line 2746 of file spaces.h.
References Size().
Referenced by CommittedPhysicalMemory(), v8::internal::StatisticsExtension::GetCounters(), and v8::internal::Heap::PrintShortHeapStatistics().
size_t v8::internal::LargeObjectSpace::CommittedPhysicalMemory | ( | ) |
Definition at line 2888 of file spaces.cc.
References CommittedMemory(), v8::internal::MemoryChunk::CommittedPhysicalMemory(), first_page_, v8::base::VirtualMemory::HasLazyCommits(), v8::internal::LargePage::next_page(), NULL, and size.
Referenced by v8::internal::Heap::CommittedPhysicalMemory().
bool v8::internal::LargeObjectSpace::Contains | ( | HeapObject * | obj | ) |
Definition at line 2980 of file spaces.cc.
References FindObject(), v8::internal::MemoryChunk::FromAddress(), v8::internal::MemoryChunk::owner(), and SLOW_DCHECK.
Referenced by v8::internal::BUILTIN().
Definition at line 2901 of file spaces.cc.
References FindPage(), v8::internal::Smi::FromInt(), v8::internal::LargePage::GetObject(), and NULL.
Referenced by Contains(), and SlowContains().
Definition at line 2910 of file spaces.cc.
References chunk_map_, v8::internal::MemoryChunk::Contains(), DCHECK, v8::internal::MemoryChunk::is_valid(), v8::internal::MemoryChunk::kAlignment, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), and NULL.
Referenced by FindObject(), and v8::internal::InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer().
|
inline |
Definition at line 2770 of file spaces.h.
References first_page_.
Referenced by v8::internal::IncrementalMarking::ActivateIncrementalWriteBarrier(), and v8::internal::IncrementalMarking::DeactivateIncrementalWriteBarrier().
void v8::internal::LargeObjectSpace::FreeUnmarkedObjects | ( | ) |
Definition at line 2926 of file spaces.cc.
References v8::internal::HeapObject::address(), chunk_map_, v8::internal::MarkBit::Clear(), first_page_, v8::internal::MemoryAllocator::Free(), v8::internal::Heap::FreeQueuedChunks(), v8::internal::MemoryChunk::FromAddress(), v8::internal::MarkBit::Get(), v8::internal::LargePage::GetObject(), v8::internal::Space::heap(), v8::internal::Heap::isolate(), v8::internal::MemoryChunk::kAlignment, v8::internal::Heap::mark_compact_collector(), v8::internal::Isolate::memory_allocator(), v8::internal::LargePage::next_page(), NULL, objects_size_, page_count_, v8::internal::Heap::QueueMemoryChunkForFree(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Remove(), v8::internal::MarkCompactCollector::ReportDeleteIfNeeded(), v8::internal::MemoryChunk::ResetLiveBytes(), v8::internal::MemoryChunk::ResetProgressBar(), v8::internal::LargePage::set_next_page(), v8::internal::MemoryChunk::size(), and size_.
Referenced by v8::internal::MarkCompactCollector::SweepSpaces().
|
inline |
|
inline |
Definition at line 2744 of file spaces.h.
References maximum_committed_.
Referenced by v8::internal::Heap::TearDown().
|
inlinestatic |
Definition at line 2725 of file spaces.h.
References v8::internal::MemoryChunk::kObjectStartOffset, and v8::internal::Page::kPageSize.
Referenced by Available().
|
inline |
bool v8::internal::LargeObjectSpace::SetUp | ( | ) |
Definition at line 2808 of file spaces.cc.
References chunk_map_, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Clear(), first_page_, maximum_committed_, NULL, objects_size_, page_count_, and size_.
Referenced by v8::internal::Heap::SetUp(), and TearDown().
|
inlinevirtual |
Implements v8::internal::Space.
Definition at line 2740 of file spaces.h.
References size_.
Referenced by CanAllocateSize(), v8::internal::Heap::CommittedMemory(), CommittedMemory(), v8::internal::StatisticsExtension::GetCounters(), and v8::internal::Heap::RecordStats().
|
inlinevirtual |
Reimplemented from v8::internal::Space.
Definition at line 2742 of file spaces.h.
References objects_size_.
Referenced by v8::internal::Heap::PrintShortHeapStatistics(), and v8::internal::Heap::PromotedSpaceSizeOfObjects().
Definition at line 2783 of file spaces.h.
References FindObject().
Referenced by v8::internal::Heap::Contains(), and v8::internal::Heap::InSpace().
void v8::internal::LargeObjectSpace::TearDown | ( | ) |
Definition at line 2819 of file spaces.cc.
References v8::internal::MemoryChunk::address(), first_page_, v8::internal::MemoryAllocator::Free(), v8::internal::Space::heap(), v8::internal::Space::identity(), v8::internal::Heap::isolate(), v8::kAllocationActionFree, LOG, v8::internal::Isolate::memory_allocator(), v8::internal::LargePage::next_page(), NULL, v8::internal::MemoryAllocator::PerformAllocationCallback(), SetUp(), v8::internal::MemoryChunk::size(), and space().
Referenced by v8::internal::Heap::TearDown().
|
friend |
|
private |
Definition at line 2794 of file spaces.h.
Referenced by AllocateRaw(), FindPage(), FreeUnmarkedObjects(), and SetUp().
|
private |
Definition at line 2789 of file spaces.h.
Referenced by AllocateRaw(), CommittedPhysicalMemory(), first_page(), FreeUnmarkedObjects(), IsEmpty(), SetUp(), and TearDown().
|
private |
Definition at line 2786 of file spaces.h.
Referenced by CanAllocateSize().
|
private |
Definition at line 2787 of file spaces.h.
Referenced by AllocateRaw(), MaximumCommittedMemory(), and SetUp().
|
private |
Definition at line 2792 of file spaces.h.
Referenced by AllocateRaw(), FreeUnmarkedObjects(), SetUp(), and SizeOfObjects().
|
private |
Definition at line 2791 of file spaces.h.
Referenced by AllocateRaw(), FreeUnmarkedObjects(), PageCount(), and SetUp().
|
private |
Definition at line 2790 of file spaces.h.
Referenced by AllocateRaw(), FreeUnmarkedObjects(), SetUp(), and Size().