mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Change default_temp_allocator_proc behaviour to use the default_allocator when the backing data has not been set.
This commit is contained in:
@@ -65,12 +65,7 @@ default_temp_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode
|
|||||||
s := (^Default_Temp_Allocator)(allocator_data);
|
s := (^Default_Temp_Allocator)(allocator_data);
|
||||||
|
|
||||||
if s.data == nil {
|
if s.data == nil {
|
||||||
a := context.allocator;
|
default_temp_allocator_init(s, DEFAULT_TEMP_ALLOCATOR_BACKING_SIZE, default_allocator());
|
||||||
if !(context.allocator.procedure != default_temp_allocator_proc &&
|
|
||||||
context.allocator.data != allocator_data) {
|
|
||||||
a = default_allocator();
|
|
||||||
}
|
|
||||||
default_temp_allocator_init(s, DEFAULT_TEMP_ALLOCATOR_BACKING_SIZE, a);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size := size;
|
size := size;
|
||||||
|
|||||||
Reference in New Issue
Block a user