mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-10 13:21:37 -07:00
Change the implementation of Arena to use virtual memory, and remove the old gbArena code
This commit is contained in:
+2
-3
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user