|
FBX C++ API Reference
|
#include <fbxmemorypool.h>
Class to create a simple fixed-size-blocks memory pool to allocate memory dynamically.
Definition at line 23 of file fbxmemorypool.h.
Public Member Functions | |
| FbxMemoryPool (size_t pBlockSize, FbxInt64 pBlockCount=0, bool pResizable=true, bool pConcurrent=true) | |
| Memory pool constructor. More... | |
| ~FbxMemoryPool () | |
| Memory pool destructor. More... | |
| void | Reset () |
| Free memory of all memory blocks from this memory pool, also effectively resetting the block count to zero. More... | |
| void * | Allocate () |
| Allocate or lock a memory block for usage. More... | |
| void | Release (void *pMemBlock) |
| Dispose or unlock a memory block. More... | |
| FbxMemoryPool | ( | size_t | pBlockSize, |
| FbxInt64 | pBlockCount = 0, |
||
| bool | pResizable = true, |
||
| bool | pConcurrent = true |
||
| ) |
Memory pool constructor.
| pBlockSize | The size of one memory block. |
| pBlockCount | The count of block that should be pre-allocated. |
| pResizable | Whether memory pool can grow if no block are availalbe upon calling Allocate. |
| pConcurrent | Whether the pool supports concurrent allocation and release operations. |
| ~FbxMemoryPool | ( | ) |
Memory pool destructor.
Upon destruction, all memory blocks of the pool will be de-allocated.
| void Reset | ( | ) |
Free memory of all memory blocks from this memory pool, also effectively resetting the block count to zero.
| void* Allocate | ( | ) |
Allocate or lock a memory block for usage.
| void Release | ( | void * | pMemBlock | ) |
Dispose or unlock a memory block.
| pMemBlock | A pointer to the memory block to release. This will not free the block's memory, instead simply putting it back in the available stack. |