|
cbase 1.46.11
C/C++ Static Template
|
A generic allocator backed by function pointers (vtable). More...
#include <mem_allocator.h>
Public Attributes | |
| void * | ctx |
| AllocFn | alloc |
| FreeFn | free |
| ReallocFn | realloc |
A generic allocator backed by function pointers (vtable).
Pass by pointer to any function that needs to allocate memory without caring about the concrete allocator type.
Definition at line 108 of file mem_allocator.h.
| AllocFn Allocator::alloc |
Allocation function. Must not be NULL.
Definition at line 110 of file mem_allocator.h.
| void* Allocator::ctx |
Opaque context passed to every function pointer.
Definition at line 109 of file mem_allocator.h.
| FreeFn Allocator::free |
Free function. May be NULL for arena allocators.
Definition at line 111 of file mem_allocator.h.
| ReallocFn Allocator::realloc |
Realloc function. May be NULL if not supported.
Definition at line 112 of file mem_allocator.h.