![]() |
Qt 6.x
The Qt SDK
|
#include <qv4mm_p.h>
Public Types | |
enum | { NumBins = 8 } |
Public Member Functions | |
BlockAllocator (ChunkAllocator *chunkAllocator, ExecutionEngine *engine) | |
HeapItem * | allocate (size_t size, bool forceAllocation=false) |
size_t | totalSlots () const |
size_t | allocatedMem () const |
size_t | usedMem () const |
void | sweep () |
void | freeAll () |
void | resetBlackBits () |
Static Public Member Functions | |
static size_t | binForSlots (size_t nSlots) |
Public Attributes | |
HeapItem * | nextFree = nullptr |
size_t | nFree = 0 |
size_t | usedSlotsAfterLastSweep = 0 |
HeapItem * | freeBins [NumBins] |
ChunkAllocator * | chunkAllocator |
ExecutionEngine * | engine |
std::vector< Chunk * > | chunks |
uint * | allocationStats = nullptr |
|
inline |
Definition at line 443 of file qv4mm.cpp.
References QV4::HeapItem::availableSlots, done, engine, QV4::Chunk::first(), QV4::HeapItem::freeData, i, QV4::HeapItem::next, Q_ASSERT, and Q_V4_PROFILE_ALLOC.
|
inline |
Definition at line 53 of file qv4mm_p.h.
References chunks, and QV4::Chunk::DataSize.
Referenced by QV4::MemoryManager::getAllocatedMem(), and QV4::MemoryManager::runGC().
|
inlinestatic |
void QV4::BlockAllocator::freeAll | ( | ) |
Definition at line 581 of file qv4mm.cpp.
References engine, and Q_V4_PROFILE_DEALLOC.
Referenced by QV4::MemoryManager::~MemoryManager().
void QV4::BlockAllocator::resetBlackBits | ( | ) |
Definition at line 591 of file qv4mm.cpp.
Referenced by QV4::MemoryManager::runGC().
|
inline |
Definition at line 49 of file qv4mm_p.h.
References QV4::Chunk::AvailableSlots, and chunks.
|
inline |
Definition at line 56 of file qv4mm_p.h.
References chunks, and QV4::Chunk::SlotSize.
Referenced by QV4::MemoryManager::getUsedMem(), and QV4::MemoryManager::runGC().
Definition at line 75 of file qv4mm_p.h.
Referenced by QV4::MemoryManager::MemoryManager().
ChunkAllocator* QV4::BlockAllocator::chunkAllocator |
std::vector<Chunk *> QV4::BlockAllocator::chunks |
Definition at line 74 of file qv4mm_p.h.
Referenced by allocatedMem(), QV4::MemoryManager::runGC(), totalSlots(), and usedMem().
ExecutionEngine* QV4::BlockAllocator::engine |
Definition at line 71 of file qv4mm_p.h.
Referenced by BlockAllocator().
size_t QV4::BlockAllocator::usedSlotsAfterLastSweep = 0 |
Definition at line 70 of file qv4mm_p.h.
Referenced by QV4::MemoryManager::runGC().