From e9cfe698bad140fcfb6dda6baf1e8b2e00e52003 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 12 Jan 2023 00:20:25 +0000 Subject: Make the `heap_allocator` just be the `permanent_allocator` This improves the speed of the compiler with very little memory increase (which surprised me, Ginger Bill) --- src/common_memory.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/common_memory.cpp') diff --git a/src/common_memory.cpp b/src/common_memory.cpp index 4c77521e1..940e79f4b 100644 --- a/src/common_memory.cpp +++ b/src/common_memory.cpp @@ -306,10 +306,11 @@ gb_internal gbAllocator temporary_allocator() { gb_internal GB_ALLOCATOR_PROC(heap_allocator_proc); gb_internal gbAllocator heap_allocator(void) { - gbAllocator a; - a.proc = heap_allocator_proc; - a.data = nullptr; - return a; + return arena_allocator(&permanent_arena); + // gbAllocator a; + // a.proc = heap_allocator_proc; + // a.data = nullptr; + // return a; } -- cgit v1.2.3