|
AGXDynamics
2.31.1.0
|
Batch allocator. More...
#include <MemoryPool.h>
Inheritance diagram for agx::BatchAllocator:Classes | |
| struct | Chunk |
Public Member Functions | |
| BatchAllocator (const char *name="BatchAllocator", uint32_t initialChunkSize=64) | |
| BatchAllocator (const BatchAllocator &other) | |
| ~BatchAllocator () | |
| void * | allocate (uint32_t numBytes) |
| void * | allocate (uint32_t numBytes, uint32_t alignment) |
| void * | allocateBytes (size_t numBytes, size_t alignment=16) |
| Allocate a memory section of specified alignment. More... | |
| void | clear () |
| void | deallocate (void *buffer) |
| void | deallocateBytes (void *buffer, size_t numBytes) |
| Deallocate a section previously allocated using allocateBytes method. More... | |
| void | deallocateBytes (void *buffer) |
| const char * | getName () const |
| BatchAllocator & | operator= (const BatchAllocator &other) |
| void | setContainer (class Container *) |
| size_t | size () |
Static Public Member Functions | |
| 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 | |
| static agx::UInt32 | allocatedMemoryPattern |
| static agx::UInt32 | deallocatedMemoryPattern |
| static bool | initMemoryFlag |
Protected Member Functions | |
| void | createChunk (uint32_t size) |
| size_t | deleteAllChunks () |
Protected Attributes | |
| uint32_t | m_chunkSize |
| Chunk * | m_firstChunk |
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 agx::max().
|
inline |
Definition at line 508 of file MemoryPool.h.
References agxAssert, and agx::isPowerOfTwo().
|
inherited |
Allocate a memory section of specified alignment.
Referenced by agx::Allocator< T >::allocate(), agx::AlignedAllocator< T >::allocate(), agx::MemoryPoolOld< T >::clear(), agx::Vector< WireContactConstraintRef >::insert(), and agx::VectorPOD< agx::Vec6 >::insert().
| void agx::BatchAllocator::clear | ( | ) |
|
protected |
Definition at line 517 of file MemoryPool.h.
References agxVerify.
Deallocate a section previously allocated using allocateBytes method.
Referenced by agx::MemoryPoolOld< T >::clear(), agx::Vector< WireContactConstraintRef >::clear(), agx::VectorPOD< agx::Vec6 >::clear(), agx::Allocator< T >::deallocate(), agx::AlignedAllocator< T >::deallocate(), agx::Vector< WireContactConstraintRef >::insert(), agx::VectorPOD< agx::Vec6 >::insert(), agx::Vector< WireContactConstraintRef >::~Vector(), and agx::VectorPOD< agx::Vec6 >::~VectorPOD().
Definition at line 173 of file Allocator.h.
|
protected |
|
inherited |
Definition at line 164 of file Allocator.h.
|
staticinherited |
| BatchAllocator& agx::BatchAllocator::operator= | ( | const BatchAllocator & | other | ) |
Definition at line 71 of file Allocator.h.
Referenced by agx::Vector< WireContactConstraintRef >::operator=(), agx::VectorPOD< agx::Vec6 >::operator=(), agx::Vector< WireContactConstraintRef >::Vector(), and agx::VectorPOD< agx::Vec6 >::VectorPOD().
|
inline |
Definition at line 534 of file MemoryPool.h.
References agx::BatchAllocator::Chunk::buffer, agx::BatchAllocator::Chunk::end, and agx::BatchAllocator::Chunk::next.
|
staticinherited |
|
staticinherited |
Definition at line 79 of file Allocator.h.
|
staticinherited |
Definition at line 80 of file Allocator.h.
|
staticinherited |
Definition at line 78 of file Allocator.h.
|
protected |
Definition at line 73 of file MemoryPool.h.
|
protected |
Definition at line 72 of file MemoryPool.h.