Class to create a simple fixed-size-blocks memory pool to allocate memory dynamically.
Definition at line 43 of file fbxmemory.h.
#include <fbxmemory.h>
Public Member Functions |
|
| FbxMemoryPool (size_t pBlockSize=0, size_t pBlockCount=0, bool pAlignment=false, bool pResizable=true, bool pSupportConcurrentAccess=true) | |
| The class constructor. |
|
| virtual | ~FbxMemoryPool () |
| void | Init (size_t pBlockSize, size_t pBlockCount=0, bool pAlignment=false, bool pResizable=true) |
| Initiate the memory pool to the given
parameters. |
|
| void | Clear () |
| Uninitialized memory pool. |
|
| void * | Allocate () |
| Allocate or lock for usage a memory block.
|
|
| void | Free (void *pMemBlock) |
| Dispose or unlock the usage of a memory
block. |
|
| FbxMemoryPool | ( | size_t | pBlockSize = 0, |
| size_t | pBlockCount = 0, |
||
| bool | pAlignment =
false, |
||
| bool | pResizable = true, |
||
| bool | pSupportConcurrentAccess =
true |
||
| ) |
The class constructor.
| pBlockSize | |
| pBlockCount | |
| pAlignment | |
| pResizable | |
| pSupportConcurrentAccess | Whether the pool supports concurrent allocation and release operations. |
| virtual ~FbxMemoryPool | ( | ) | [virtual] |
| void Init | ( | size_t | pBlockSize, |
| size_t | pBlockCount = 0, |
||
| bool | pAlignment =
false, |
||
| bool | pResizable =
true |
||
| ) |
Initiate the memory pool to the given parameters.
| pBlockSize | |
| pBlockCount | The blocks size. |
| pAlignment | Alignment. |
| pResizable | Is it resizable? |
| void Clear | ( | ) |
Uninitialized memory pool.
| void* Allocate | ( | ) |
| void Free | ( | void * | pMemBlock | ) |
Dispose or unlock the usage of a memory block.
Asserting that this pool own this block.
| pMemBlock |