diff options
| author | gingerBill <bill@gingerbill.org> | 2021-02-09 14:00:59 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-02-09 14:00:59 +0000 |
| commit | 92431c83ec03ef809cd7f9583093020839d290e8 (patch) | |
| tree | ec44a4bf5ac326a9580fbcc6692ceaf3a9044ea5 /core/runtime/default_allocators.odin | |
| parent | f5418837f0e468de2d1a7c122a3a460a8e6bdec5 (diff) | |
Change `default_temp_allocator_proc` behaviour to use the `default_allocator` when the backing data has not been set.
Diffstat (limited to 'core/runtime/default_allocators.odin')
| -rw-r--r-- | core/runtime/default_allocators.odin | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/core/runtime/default_allocators.odin b/core/runtime/default_allocators.odin index b9d18524f..518cdf287 100644 --- a/core/runtime/default_allocators.odin +++ b/core/runtime/default_allocators.odin @@ -65,12 +65,7 @@ default_temp_allocator_proc :: proc(allocator_data: rawptr, mode: Allocator_Mode s := (^Default_Temp_Allocator)(allocator_data); if s.data == nil { - a := context.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); + default_temp_allocator_init(s, DEFAULT_TEMP_ALLOCATOR_BACKING_SIZE, default_allocator()); } size := size; |