Go to the source code of this file.
|
| | ZERO_SIZED (nullalloc) |
| | An allocator for the standard allocator, which only has global state,.
|
| static nullalloc | get () |
| static void * | malloc (nullalloc *self, size_t size) |
| static void * | realloc (nullalloc *self, void *ptr, size_t size) |
| static void * | calloc (nullalloc *self, size_t count, size_t size) |
| static void | free (nullalloc *self, void *ptr) |
| | TRAIT_ALLOC (nullalloc) |
◆ calloc()
| void * calloc |
( |
nullalloc * | self, |
|
|
size_t | count, |
|
|
size_t | size ) |
|
static |
Definition at line 28 of file null.h.
28 {
29 (void)count;
32 return NULL;
33}
static INDEX_TYPE size(SELF const *self)
◆ free()
| void free |
( |
nullalloc * | self, |
|
|
void * | ptr ) |
|
static |
Definition at line 35 of file null.h.
35 {
36 (void)ptr;
38 PANIC(
"Not possible to free memory from the null allocator, as it allocates nothing")
39}
◆ get()
Definition at line 13 of file null.h.
13{ return (nullalloc){}; }
◆ malloc()
| void * malloc |
( |
nullalloc * | self, |
|
|
size_t | size ) |
|
static |
◆ realloc()
| void * realloc |
( |
nullalloc * | self, |
|
|
void * | ptr, |
|
|
size_t | size ) |
|
static |
◆ TRAIT_ALLOC()
| TRAIT_ALLOC |
( |
nullalloc | | ) |
|
◆ ZERO_SIZED()
An allocator for the standard allocator, which only has global state,.