QFrameAllocator Class

(Qt3D::QFrameAllocator)

Provides a pool of memory chunks to be used to allocate objects on a per frame basis. More...

Header: #include <QFrameAllocator>
qmake: QT += 3dcore

Public Functions

QFrameAllocator(uint maxObjectSize, uint alignment = 16, uint pageSize = 128)
~QFrameAllocator()
T * allocate()
void * allocateRawMemory(size_t size)
int allocatorPoolSize() const
void clear()
void deallocate(T * ptr)
void deallocateRawMemory(void * ptr, size_t size)
uint maxObjectSize() const
uint totalChunkCount() const
void trim()

Detailed Description

Provides a pool of memory chunks to be used to allocate objects on a per frame basis.

The memory can be recycled by following frames by calling clear which won't deallocate any memory.

Member Function Documentation

QFrameAllocator::QFrameAllocator(uint maxObjectSize, uint alignment = 16, uint pageSize = 128)

QFrameAllocator::~QFrameAllocator()

T * QFrameAllocator::allocate()

void * QFrameAllocator::allocateRawMemory(size_t size)

int QFrameAllocator::allocatorPoolSize() const

void QFrameAllocator::clear()

void QFrameAllocator::deallocate(T * ptr)

void QFrameAllocator::deallocateRawMemory(void * ptr, size_t size)

uint QFrameAllocator::maxObjectSize() const

uint QFrameAllocator::totalChunkCount() const

void QFrameAllocator::trim()