Remove usage of global_default_temp_allocator_data when there is no default allocator (freestanding, JS or --default-to-nil-allocator)

This commit is contained in:
Fabian Sperber
2023-03-13 20:12:54 +01:00
parent 93f7d3bfb9
commit 830d2007a6
3 changed files with 17 additions and 11 deletions
+3 -1
View File
@@ -621,7 +621,9 @@ __init_context :: proc "contextless" (c: ^Context) {
c.allocator.data = nil
c.temp_allocator.procedure = default_temp_allocator_proc
c.temp_allocator.data = &global_default_temp_allocator_data
when !NO_DEFAULT_TEMP_ALLOCATOR {
c.temp_allocator.data = &global_default_temp_allocator_data
}
when !ODIN_DISABLE_ASSERT {
c.assertion_failure_proc = default_assertion_failure_proc