Tramway SDK
|
Allocator. More...
#include <stackpool.h>
Public Member Functions | |
constexpr | StackPool (std::string name, size_t size) |
constexpr | StackPool (std::string name, size_t max_size, std::initializer_list< T > list) |
T * | AddNew (size_t units) |
T * | allocate (size_t units) |
void | Reset () |
void | reset () |
size_t | size () |
T * | begin () |
T * | end () |
Protected Attributes | |
std::string | name |
size_t | allocated_size |
size_t | available_size |
T * | first |
T * | last |
Allocator.
Very simple allocator for data types that don't need their destructors called. Just call allocate() and specify the size of the array that you want to allocated. Use the pointer to write and store data. After you are done, you can reset all of the allocated memory with reset().
|
inlineconstexpr |
|
inlineconstexpr |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |