ref: a70379d7e4b822f532fb0a8ccdd1624a90b64a68
dir: /src/mem.h/
#if !defined(HEAP_SIZE0) #define HEAP_SIZE0 4*1024*1024 #endif #if !defined(STACK_SIZE0) #define STACK_SIZE0 64*1024 #endif #if !defined(ALLOC_LIMIT_TRIGGER) #define ALLOC_LIMIT_TRIGGER HEAP_SIZE0 #endif #if !defined(MEM_CALLOC) #define MEM_CALLOC(n, sz) calloc((usize)(n), (usize)(sz)) #define MEM_ALLOC(n) malloc((usize)(n)) #define MEM_REALLOC(p, n) realloc((p), (usize)(n)) #define MEM_FREE(x) free(x) #define MEM_STRDUP(s) strdup(s) #if !defined(sl_segalloc) void *sl_segalloc(usize sz); void sl_segfree(void *s, usize sz); void sl_segused(void *s, usize sz, usize used); #endif #endif