From 1290906d664d2aba36e8f4e869e6d50a68df3e86 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Mon, 7 Apr 2025 23:35:38 +0200 Subject: [PATCH] Setup temp allocator by default on Wasm --- lib/std/core/mem_allocator.c3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/core/mem_allocator.c3 b/lib/std/core/mem_allocator.c3 index 35dcffac9..8f4702512 100644 --- a/lib/std/core/mem_allocator.c3 +++ b/lib/std/core/mem_allocator.c3 @@ -452,12 +452,12 @@ macro Allocator temp() alias tmem @builtin = current_temp; -fn void allow_implicit_temp_allocator_on_load_thread() @init(1) @local @if(env::LIBC) +fn void allow_implicit_temp_allocator_on_load_thread() @init(1) @local @if(env::LIBC || env::WASM_NOLIBC) { auto_create_temp = true; } -fn void destroy_temp_allocators_after_exit() @finalizer(65535) @local @if(env::LIBC) +fn void destroy_temp_allocators_after_exit() @finalizer(65535) @local @if(env::LIBC || env::WASM_NOLIBC) { destroy_temp_allocators(); }