Setup temp allocator by default on Wasm

This commit is contained in:
Christoffer Lerno
2025-04-07 23:35:38 +02:00
parent 25d416aca1
commit 1290906d66

View File

@@ -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();
}