13static nullalloc
NS(nullalloc,
get)() {
return (nullalloc){}; }
21static void*
NS(nullalloc,
realloc)(nullalloc* self,
void* ptr,
size_t size) {
28static void*
NS(nullalloc,
calloc)(nullalloc* self,
size_t count,
size_t size) {
35static void NS(nullalloc,
free)(nullalloc* self,
void* ptr) {
38 PANIC(
"Not possible to free memory from the null allocator, as it allocates nothing")
static void free(SELF *self, void *ptr)
static void * realloc(SELF *self, void *ptr, size_t size)
static void * malloc(SELF *self, size_t size)
static void * calloc(SELF *self, size_t count, size_t size)
#define TRAIT_ALLOC(SELF)
static INDEX_TYPE size(SELF const *self)
#define ZERO_SIZED(TYPE)
Zero sized types are useful as markers (e.g. for gdb printing, or to replace debug info structs.