Implement Allocator wrapper for memory context
This commit is contained in:
@@ -16,6 +16,11 @@ internal MemCTX g_context = {0};
|
||||
|
||||
internal Arena *get_arena(CTXDestBuffer buffer);
|
||||
|
||||
Allocator wapp_mem_ctx_allocator(CTXDestBuffer buffer) {
|
||||
Arena *arena = get_arena(buffer);
|
||||
return wapp_mem_arena_allocator(arena);
|
||||
}
|
||||
|
||||
void wapp_mem_ctx_init(u64 main_buf_capacity, u64 temp_buf_capacity) {
|
||||
g_context.main_initialised =
|
||||
wapp_mem_arena_init(&g_context.main, main_buf_capacity);
|
||||
|
||||
Reference in New Issue
Block a user