|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
This is a modification of the implementation in the "Fast Efficient Fixed-Size Memory Pool" paper by Ben Kenwright. More...
#include <aeongames/MemoryPool.hpp>

Public Member Functions | |
| DLL | MemoryPool (size_t sizeOfEachBlock, size_t numOfBlocks) |
| Construct a memory pool. | |
| DLL void * | Allocate () |
| Allocate a block from the pool. | |
| DLL void | DeAllocate (void *p) |
| Return a block to the pool. | |
This is a modification of the implementation in the "Fast Efficient Fixed-Size Memory Pool" paper by Ben Kenwright.
Definition at line 53 of file MemoryPool.hpp.
| AeonGames::MemoryPool::MemoryPool | ( | size_t | sizeOfEachBlock, |
| size_t | numOfBlocks ) |
Construct a memory pool.
| sizeOfEachBlock | Size of each memory block in bytes. |
| numOfBlocks | Number of blocks to pre-allocate. |
Definition at line 19 of file MemoryPool.cpp.
| void * AeonGames::MemoryPool::Allocate | ( | ) |
Allocate a block from the pool.
Definition at line 39 of file MemoryPool.cpp.
| void AeonGames::MemoryPool::DeAllocate | ( | void * | p | ) |
Return a block to the pool.
| p | Pointer to the block to deallocate. |
Definition at line 64 of file MemoryPool.cpp.