diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-26 15:38:34 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-26 15:38:34 +0100 |
| commit | aa8777ee47f503eb90d4e2225274d0d20a9b39a3 (patch) | |
| tree | 1848951efd4e7452e5fc04376e21920718f44a76 /src/parser.hpp | |
| parent | 98dd59e412314f089fc9558c5cf92a8a5df5213a (diff) | |
Change the implementation of `Arena` to use virtual memory, and remove the old gbArena code
Diffstat (limited to 'src/parser.hpp')
| -rw-r--r-- | src/parser.hpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parser.hpp b/src/parser.hpp index 1b45024b6..082415d16 100644 --- a/src/parser.hpp +++ b/src/parser.hpp @@ -95,7 +95,7 @@ struct AstFile { AstPackage * pkg; Scope * scope; - Arena arena; + Arena arena; Ast * pkg_decl; String fullpath; @@ -741,11 +741,10 @@ gb_inline bool is_ast_when_stmt(Ast *node) { return node->kind == Ast_WhenStmt; } -gb_global Arena global_ast_arena = {}; +gb_global gb_thread_local Arena global_ast_arena = {}; gbAllocator ast_allocator(AstFile *f) { Arena *arena = f ? &f->arena : &global_ast_arena; - // Arena *arena = &global_ast_arena; return arena_allocator(arena); } |