Change the implementation of Arena to use virtual memory, and remove the old gbArena code

This commit is contained in:
gingerBill
2021-08-26 15:38:34 +01:00
parent 98dd59e412
commit aa8777ee47
9 changed files with 424 additions and 1053 deletions

View File

@@ -1,11 +1,6 @@
gb_global gbArena string_buffer_arena = {};
gb_global gbAllocator string_buffer_allocator = {};
gb_global BlockingMutex string_buffer_mutex = {};
void init_string_buffer_memory(void) {
// NOTE(bill): This should be enough memory for file systems
gb_arena_init_from_allocator(&string_buffer_arena, heap_allocator(), gb_megabytes(1));
string_buffer_allocator = gb_arena_allocator(&string_buffer_arena);
mutex_init(&string_buffer_mutex);
}