![]() |
v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <spaces.h>
Public Member Functions | |
LargeObjectSpace (Heap *heap, intptr_t max_capacity, AllocationSpace id) | |
virtual | ~LargeObjectSpace () |
bool | SetUp () |
void | TearDown () |
MUST_USE_RESULT MaybeObject * | AllocateRaw (int object_size, Executability executable) |
intptr_t | Available () |
virtual intptr_t | Size () |
virtual intptr_t | SizeOfObjects () |
int | PageCount () |
MaybeObject * | FindObject (Address a) |
LargePage * | FindPage (Address a) |
void | FreeUnmarkedObjects () |
bool | Contains (HeapObject *obj) |
bool | IsEmpty () |
virtual bool | ReserveSpace (int bytes) |
LargePage * | first_page () |
bool | SlowContains (Address addr) |
![]() | |
Space (Heap *heap, AllocationSpace id, Executability executable) | |
virtual | ~Space () |
Heap * | heap () const |
Executability | executable () |
AllocationSpace | identity () |
virtual int | RoundSizeDownToObjectAlignment (int size) |
![]() | |
void * | operator new (size_t size) |
void | operator delete (void *p) |
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) |
Friends | |
class | LargeObjectIterator |
LargeObjectSpace | ( | Heap * | heap, |
intptr_t | max_capacity, | ||
AllocationSpace | id | ||
) |
|
inlinevirtual |
MaybeObject * AllocateRaw | ( | int | object_size, |
Executability | executable | ||
) |
Definition at line 2613 of file spaces.cc.
References MemoryChunk::area_size(), ASSERT, Smi::FromInt(), LargePage::GetObject(), Space::heap(), Space::identity(), Heap::incremental_marking(), Heap::isolate(), MemoryChunk::kAlignment, TemplateHashMapImpl< AllocationPolicy >::Lookup(), Isolate::memory_allocator(), v8::internal::NULL, IncrementalMarking::OldSpaceStep(), Failure::RetryAfterGC(), LargePage::set_next_page(), MemoryChunk::size(), and LargeObjectSpace::Size().
Referenced by Heap::AllocateAsciiSymbol(), Heap::AllocateByteArray(), Heap::AllocateInternalSymbol(), Heap::AllocateRaw(), Heap::AllocateRawFixedArray(), Heap::AllocateTwoByteSymbol(), Heap::CopyCode(), Heap::CreateCode(), TEST(), and MarkCompactCollector::TryPromoteObject().
|
inline |
Definition at line 332 of file spaces-inl.h.
References Space::heap(), and LargeObjectSpace::ObjectSizeFor().
Referenced by Heap::PrintShortHeapStatistics(), and TEST().
bool Contains | ( | HeapObject * | obj | ) |
Definition at line 2743 of file spaces.cc.
References LargeObjectSpace::FindObject(), MemoryChunk::FromAddress(), MemoryChunk::owner(), and SLOW_ASSERT.
Referenced by v8::internal::BUILTIN(), and TEST().
MaybeObject * FindObject | ( | Address | a | ) |
Definition at line 2664 of file spaces.cc.
References Failure::Exception(), LargeObjectSpace::FindPage(), LargePage::GetObject(), and v8::internal::NULL.
Referenced by LargeObjectSpace::Contains(), LargeObjectSpace::SlowContains(), and TEST().
Definition at line 2673 of file spaces.cc.
References ASSERT, MemoryChunk::Contains(), MemoryChunk::is_valid(), MemoryChunk::kAlignment, TemplateHashMapImpl< AllocationPolicy >::Lookup(), and v8::internal::NULL.
Referenced by LargeObjectSpace::FindObject(), and InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer().
void FreeUnmarkedObjects | ( | ) |
Definition at line 2690 of file spaces.cc.
References HeapObject::address(), MarkBit::Clear(), MemoryAllocator::Free(), Heap::FreeQueuedChunks(), MarkBit::Get(), LargePage::GetObject(), Space::heap(), MemoryChunk::IncrementLiveBytesFromGC(), Heap::isolate(), MemoryChunk::kAlignment, Heap::mark_compact_collector(), Marking::MarkBitFrom(), Isolate::memory_allocator(), LargePage::next_page(), v8::internal::NULL, Heap::QueueMemoryChunkForFree(), TemplateHashMapImpl< AllocationPolicy >::Remove(), MarkCompactCollector::ReportDeleteIfNeeded(), LargePage::set_next_page(), and MemoryChunk::size().
|
inline |
|
inlinestatic |
Definition at line 2478 of file spaces.h.
References MemoryChunk::kObjectStartOffset, and Page::kPageSize.
Referenced by LargeObjectSpace::Available().
|
virtual |
Implements Space.
Definition at line 2267 of file spaces.cc.
References Space::heap(), Heap::incremental_marking(), IncrementalMarking::IsStopped(), Heap::OldGenerationCapacityAvailable(), and Heap::OldGenerationSpaceAvailable().
Referenced by Heap::ReserveSpace().
bool SetUp | ( | ) |
Definition at line 2588 of file spaces.cc.
References TemplateHashMapImpl< AllocationPolicy >::Clear(), and v8::internal::NULL.
Referenced by Heap::SetUp(), and LargeObjectSpace::TearDown().
|
inlinevirtual |
Implements Space.
Definition at line 2491 of file spaces.h.
Referenced by LargeObjectSpace::AllocateRaw(), Heap::CommittedMemory(), Heap::PrintShortHeapStatistics(), and Heap::RecordStats().
|
inlinevirtual |
Reimplemented from Space.
Definition at line 2495 of file spaces.h.
Referenced by Heap::PromotedSpaceSizeOfObjects().
|
inline |
Definition at line 2536 of file spaces.h.
References LargeObjectSpace::FindObject().
Referenced by Heap::Contains(), and Heap::InSpace().
void TearDown | ( | ) |
Definition at line 2598 of file spaces.cc.
References MemoryChunk::address(), MemoryAllocator::Free(), Space::heap(), Space::identity(), Heap::isolate(), v8::kAllocationActionFree, LOG, Isolate::memory_allocator(), LargePage::next_page(), v8::internal::NULL, MemoryAllocator::PerformAllocationCallback(), LargeObjectSpace::SetUp(), and MemoryChunk::size().
Referenced by Heap::TearDown().
|
friend |