![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
#include <LinearAllocator.h>

Public Member Functions | |
| ScopedLinearAllocator (LinearAllocator &allocator) | |
| ~ScopedLinearAllocator () | |
| void * | allocate (std::size_t n, std::size_t alignment) |
| void | deallocate (void *ptr, std::size_t n) |
Private Attributes | |
| LinearAllocator & | m_Allocator |
| std::uint32_t | m_AllocationCount {0u} |
Scoped linear allocators ensures that the base allocator is empty.
TODO: currently it gives a very simple tree structure of one root node - base allocator and many leaves. We need to implement a tree-like call structure. It allows to reuse memory between different "tree" branches. While a "node" is locked nobody can't allocate from that allocator.
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |