General-purpose allocator for small, variable-sized allocations up to 512 bytes.
More...
#include <smallblock_allocator.h>
|
|
static constexpr uint32_t | MAX_SIZE = SmallBlockMaxSize |
| |
General-purpose allocator for small, variable-sized allocations up to 512 bytes.
◆ alloc()
| GAIA_NODISCARD void * gaia::mem::detail::SmallBlockAllocatorImpl::alloc |
( |
uint32_t |
bytesWanted | ) |
|
|
inline |
Allocates storage for up to 512 bytes.
- Parameters
-
| bytesWanted | Requested usable bytes. |
- Returns
- Pointer to aligned usable storage.
◆ flush()
| void gaia::mem::detail::SmallBlockAllocatorImpl::flush |
( |
bool |
releaseAll = false | ) |
|
|
inline |
Flushes unused pages.
- Parameters
-
| releaseAll | When true, all empty pages are released. |
◆ free()
| void gaia::mem::detail::SmallBlockAllocatorImpl::free |
( |
void * |
pBlock | ) |
|
|
inline |
Releases storage allocated for the given pointer.
- Parameters
-
| pBlock | Pointer previously returned by alloc(). |
The documentation for this class was generated from the following file: