|
AGX Dynamics 2.42.3.1
|
Batch allocator. More...
#include <MemoryPool.h>
Inheritance diagram for agx::BatchAllocator:Classes | |
| struct | Chunk |
Public Member Functions | |
| BatchAllocator (const BatchAllocator &other) | |
| BatchAllocator (const char *name="BatchAllocator", uint32_t initialChunkSize=64) | |
| ~BatchAllocator () | |
| void * | allocate (uint32_t numBytes) |
| void * | allocate (uint32_t numBytes, uint32_t alignment) |
| void | clear () |
| void | deallocate (void *buffer) |
| BatchAllocator & | operator= (const BatchAllocator &other) |
| size_t | size () |
Public Member Functions inherited from agx::ByteAllocator | |
| ByteAllocator (const ByteAllocator &other) | |
| ByteAllocator (const char *name="ByteAllocator") | |
| void * | allocateBytes (size_t numBytes, size_t alignment=16) |
| Allocate a memory section of specified alignment. | |
| void | deallocateBytes (void *buffer) |
| void | deallocateBytes (void *buffer, size_t numBytes) |
| Deallocate a section previously allocated using allocateBytes method. | |
| const char * | getName () const |
| ByteAllocator & | operator= (const ByteAllocator &other) |
| void | setContainer (class Container *) |
Protected Member Functions | |
| void | createChunk (uint32_t size) |
| size_t | deleteAllChunks () |
Protected Attributes | |
| uint32_t | m_chunkSize |
| Chunk * | m_firstChunk |
Additional Inherited Members | |
Static Public Member Functions inherited from agx::ByteAllocator | |
| static void | initMemory (void *data, size_t numBytes, agx::UInt32 pattern) |
| static void * | standaloneAllocateBytes (size_t numBytes, size_t alignment=16) |
| static void | standaloneDeallocateTypes (void *buffer) |
Static Public Attributes inherited from agx::ByteAllocator | |
| static agx::UInt32 | allocatedMemoryPattern |
| static agx::UInt32 | deallocatedMemoryPattern |
| static bool | initMemoryFlag |
Batch allocator.
Definition at line 45 of file MemoryPool.h.
| agx::BatchAllocator::BatchAllocator | ( | const char * | name = "BatchAllocator", |
| uint32_t | initialChunkSize = 64 |
||
| ) |
| agx::BatchAllocator::~BatchAllocator | ( | ) |
| agx::BatchAllocator::BatchAllocator | ( | const BatchAllocator & | other | ) |
|
inline |
Definition at line 497 of file MemoryPool.h.
References createChunk(), agx::BatchAllocator::Chunk::end, agx::BatchAllocator::Chunk::head, m_chunkSize, and m_firstChunk.
Referenced by agx::MemoryPool< T >::allocate(), and allocate().
|
inline |
Definition at line 508 of file MemoryPool.h.
References agxAssert, allocate(), agx::BatchAllocator::Chunk::head, agx::isPowerOfTwo(), and m_firstChunk.
| void agx::BatchAllocator::clear | ( | ) |
Referenced by agx::MemoryPool< T >::clear(), and agx::MemoryPool< T >::clearFast().
|
protected |
Referenced by allocate().
|
inline |
Definition at line 517 of file MemoryPool.h.
References agxVerify.
|
protected |
| BatchAllocator & agx::BatchAllocator::operator= | ( | const BatchAllocator & | other | ) |
|
inline |
Definition at line 534 of file MemoryPool.h.
References agx::BatchAllocator::Chunk::buffer, agx::BatchAllocator::Chunk::end, m_firstChunk, and agx::BatchAllocator::Chunk::next.
|
protected |
Definition at line 73 of file MemoryPool.h.
Referenced by allocate().
|
protected |
Definition at line 72 of file MemoryPool.h.
Referenced by allocate(), and size().