From 5c602745fd3ff9b0d8736ed8e91024ff5802a142 Mon Sep 17 00:00:00 2001 From: Alexandros Naskos Date: Thu, 7 May 2020 16:20:45 +0300 Subject: [PATCH] Use the page allocator as our base allocator for now. --- src/main.zig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.zig b/src/main.zig index 0da6194..1b68b03 100644 --- a/src/main.zig +++ b/src/main.zig @@ -387,11 +387,10 @@ const leak_count_alloc: ?*std.testing.LeakCountAllocator = if (use_leak_count_al pub fn main() anyerror!void { - // Init memory - - var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); - defer arena.deinit(); - allocator = &arena.allocator; + // TODO: Use a better purpose general allocator once std has one. + // Probably after the generic composable allocators PR? + // This is not too bad for now since most allocations happen in local areans. + allocator = std.heap.page_allocator; if (use_leak_count_alloc) { // Initialize the leak counting allocator.