#include <PoolAllocator.hpp>
◆ PoolAllocator() [1/4]
fmemory::PoolAllocator::PoolAllocator |
( |
| ) |
|
◆ PoolAllocator() [2/4]
fmemory::PoolAllocator::PoolAllocator |
( |
const std::size_t |
element_size_in_bytes, |
|
|
const std::size_t |
num_of_elements, |
|
|
const std::size_t |
alignment |
|
) |
| |
Parameterized constructor
- Parameters
-
size_t | element size in bytes sizeof(T) |
size_t | number of elements |
size_t | alignment required |
◆ PoolAllocator() [3/4]
◆ PoolAllocator() [4/4]
fmemory::PoolAllocator::PoolAllocator |
( |
PoolAllocator && |
refToPool | ) |
|
|
delete |
◆ ~PoolAllocator()
fmemory::PoolAllocator::~PoolAllocator |
( |
| ) |
|
Destructor. Deallocates all the memory and frees everything.
◆ CreatePool()
void fmemory::PoolAllocator::CreatePool |
( |
const std::size_t |
element_size_in_bytes, |
|
|
const std::size_t |
num_of_elements, |
|
|
const std::size_t |
alignment |
|
) |
| |
Creats pool of memory for requested number of elements.
- Parameters
-
size_t | element size in bytes sizeof(T) |
size_t | number of elements |
size_t | alignment required |
◆ GetBlocKFromPool()
void * fmemory::PoolAllocator::GetBlocKFromPool |
( |
| ) |
|
Returns next free block from pool.
- Returns
- void* returns pointer if block available else nullptr
◆ GetPoolMemLocation()
void * fmemory::PoolAllocator::GetPoolMemLocation |
( |
| ) |
|
Returns base pointer to the pool.
- Returns
- void* return pointer to the pool
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ Release()
void fmemory::PoolAllocator::Release |
( |
void * |
memory_block | ) |
|
Releases the referenced block and adds back to free list.
- Parameters
-
void* | pointer to memory_block |
The documentation for this class was generated from the following files: