From aa8777ee47f503eb90d4e2225274d0d20a9b39a3 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 26 Aug 2021 15:38:34 +0100 Subject: Change the implementation of `Arena` to use virtual memory, and remove the old gbArena code --- src/parser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 880e92273..a98259454 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -4784,9 +4784,8 @@ ParseFileError init_ast_file(AstFile *f, String fullpath, TokenPos *err_pos) { isize const page_size = 4*1024; isize block_size = 2*f->tokens.count*gb_size_of(Ast); block_size = ((block_size + page_size-1)/page_size) * page_size; - block_size = gb_clamp(block_size, page_size, ARENA_DEFAULT_BLOCK_SIZE); - - arena_init(&f->arena, heap_allocator(), block_size); + block_size = gb_clamp(block_size, page_size, DEFAULT_MINIMUM_BLOCK_SIZE); + f->arena.minimum_block_size = block_size; array_init(&f->comments, heap_allocator(), 0, 0); -- cgit v1.2.3