shithub: sl

ref: a70379d7e4b822f532fb0a8ccdd1624a90b64a68
dir: /src/mem_dlmalloc.h/

View raw version
void *sl_malloc(usize);
void sl_free(void *);
void *sl_calloc(usize, usize);
void *sl_realloc(void *, usize);
char *sl_strdup(const char *s);
#define MEM_CALLOC(n, sz) sl_calloc((usize)(n), (usize)(sz))
#define MEM_ALLOC(n) sl_malloc((usize)(n))
#define MEM_REALLOC(p, n) sl_realloc((p), (usize)(n))
#define MEM_FREE(x) sl_free(x)
#define MEM_STRDUP(s) sl_strdup(s)
#define sl_segalloc(sz) MEM_ALLOC((usize)sz)
#define sl_segfree(s, sz) MEM_FREE(s)
#define sl_segused(s, sz, used) do{}while(0)