v8
3.14.5(node0.10.28)
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 () |
intptr_t | CommittedMemory () |
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) |
Public Member Functions inherited from Space | |
Space (Heap *heap, AllocationSpace id, Executability executable) | |
virtual | ~Space () |
Heap * | heap () const |
Executability | executable () |
AllocationSpace | identity () |
virtual int | RoundSizeDownToObjectAlignment (int size) |
Public Member Functions inherited from Malloced | |
void * | operator new (size_t size) |
void | operator delete (void *p) |
Static Public Member Functions | |
static intptr_t | ObjectSizeFor (intptr_t chunk_size) |
Static Public Member Functions inherited from Malloced | |
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 2650 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(), Heap::ShouldZapGarbage(), 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 336 of file spaces-inl.h.
References Space::heap(), and LargeObjectSpace::ObjectSizeFor().
Referenced by StatisticsExtension::GetCounters(), Heap::PrintShortHeapStatistics(), and TEST().
|
inline |
Definition at line 2523 of file spaces.h.
References LargeObjectSpace::Size().
Referenced by StatisticsExtension::GetCounters(), and Heap::PrintShortHeapStatistics().
bool Contains | ( | HeapObject * | obj | ) |
Definition at line 2781 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 2702 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 2711 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 2728 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 2502 of file spaces.h.
References MemoryChunk::kObjectStartOffset, and Page::kPageSize.
Referenced by LargeObjectSpace::Available().
|
virtual |
Definition at line 2302 of file spaces.cc.
References Space::heap(), Heap::incremental_marking(), IncrementalMarking::IsStopped(), Heap::OldGenerationCapacityAvailable(), and Heap::OldGenerationSpaceAvailable().
bool SetUp | ( | ) |
Definition at line 2625 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 2515 of file spaces.h.
Referenced by LargeObjectSpace::AllocateRaw(), Heap::CommittedMemory(), LargeObjectSpace::CommittedMemory(), StatisticsExtension::GetCounters(), and Heap::RecordStats().
|
inlinevirtual |
Reimplemented from Space.
Definition at line 2519 of file spaces.h.
Referenced by Heap::PrintShortHeapStatistics(), and Heap::PromotedSpaceSizeOfObjects().
|
inline |
Definition at line 2567 of file spaces.h.
References LargeObjectSpace::FindObject().
Referenced by Heap::Contains(), and Heap::InSpace().
void TearDown | ( | ) |
Definition at line 2635 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 |