mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 07:08:48 +00:00
Change push allocator system; update core libraries
This commit is contained in:
+8
-1
@@ -115,9 +115,16 @@ init_arena_from_context :: proc(using a: ^Arena, size: int) {
|
||||
temp_count = 0;
|
||||
}
|
||||
|
||||
|
||||
context_from_allocator :: proc(a: Allocator) -> Context {
|
||||
c := context;
|
||||
c.allocator = a;
|
||||
return c;
|
||||
}
|
||||
|
||||
destroy_arena :: proc(using a: ^Arena) {
|
||||
if backing.procedure != nil {
|
||||
push_allocator backing {
|
||||
context <- context_from_allocator(backing) {
|
||||
free(memory);
|
||||
memory = nil;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user