mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Finalize subprograms after writing them. Correct debug info for C varargs. Add uwtable metadata. Removed visibility from functions.
This commit is contained in:
committed by
Christoffer Lerno
parent
aa216fa510
commit
209d994336
@@ -93,8 +93,23 @@ void memory_release();
|
||||
#define idptr(id_) ((void*)(((uintptr_t)id_) * 16 + arena_zero))
|
||||
void *calloc_arena(size_t mem);
|
||||
char *calloc_string(size_t len);
|
||||
#ifdef NDEBUG
|
||||
#define malloc_string calloc_string
|
||||
#define malloc_arena calloc_arena
|
||||
#else
|
||||
static inline void *malloc_string(size_t len)
|
||||
{
|
||||
void *data = calloc_string(len);
|
||||
memset(data, 0xaa, len);
|
||||
return data;
|
||||
}
|
||||
static inline void *malloc_arena(size_t len)
|
||||
{
|
||||
void *data = calloc_arena(len);
|
||||
memset(data, 0xaa, len);
|
||||
return data;
|
||||
}
|
||||
#endif
|
||||
void free_arena(void);
|
||||
void print_arena_status(void);
|
||||
void run_arena_allocator_tests(void);
|
||||
|
||||
Reference in New Issue
Block a user