14static stdalloc*
NS(stdalloc,
get)() {
15 static stdalloc instance = {};
24static void*
NS(stdalloc,
realloc)(stdalloc* self,
void* ptr,
size_t size) {
32static void*
NS(stdalloc,
calloc)(stdalloc* self,
size_t count,
size_t size) {
37static void NS(stdalloc,
free)(stdalloc* self,
void* ptr) {
45 fprintf(
stream,
"stdalloc@%p { }", self);
static void debug(SELF const *self, dc_debug_fmt fmt, FILE *stream)
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 DC_TRAIT_ALLOC(SELF)
static INDEX_TYPE size(SELF const *self)
#define DC_ASSUME(expr,...)
static void * calloc(stdalloc *self, size_t count, size_t size)
static void free(stdalloc *self, void *ptr)
static void * realloc(stdalloc *self, void *ptr, size_t size)
static void * malloc(stdalloc *self, size_t size)
Debug format helpers for debug printin data structures.
static FILE * stream(SELF *self)
Opens a file for.
#define DC_ZERO_SIZED(TYPE)
Zero sized types are useful as markers (e.g. for gdb printing, or to replace debug info structs.