#include <StackAllocator.h>
◆ StackAllocator()
| Fling::StackAllocator::StackAllocator |
( |
void * |
t_Start, |
|
|
void * |
t_End |
|
) |
| |
Construct a new Stack Allocator object.
- Parameters
-
| t_Start | Start of the memory block to use for this stack allocator |
| t_End | End of the memory block to use for this stack allocator |
◆ ~StackAllocator()
| Fling::StackAllocator::~StackAllocator |
( |
| ) |
|
◆ Allocate()
| void * Fling::StackAllocator::Allocate |
( |
size_t |
t_Size, |
|
|
size_t |
t_Alignment = 0, |
|
|
size_t |
t_Offset = 0 |
|
) |
| |
- Parameters
-
| t_Size | Size of the block of memory |
| t_Alignment | Alignment of the element (Default = 8) |
| t_Offset | Offset of the element (Default = 0) |
- Returns
- void* Obtain a chunk of memory of the size, alignment, and offset (asserts when we exceed preallocated size)
◆ Free()
| void Fling::StackAllocator::Free |
( |
void * |
t_Ptr | ) |
|
Returns a block of memory to the stack in a LIFO manner.
- Parameters
-
◆ m_Current
| char* Fling::StackAllocator::m_Current = nullptr |
|
private |
◆ m_End
| char* Fling::StackAllocator::m_End = nullptr |
|
private |
◆ m_Start
| char* Fling::StackAllocator::m_Start = nullptr |
|
private |
The documentation for this class was generated from the following files: