Skip to content

Commit

Permalink
Fixes to scoped mem report.
Browse files Browse the repository at this point in the history
  • Loading branch information
lerno committed Feb 17, 2024
1 parent d7cc37b commit bec1116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/core/mem.c3
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ macro void @scoped(Allocator* allocator; @body())
macro void @report_heap_allocs_in_scope(;@body())
{
TrackingAllocator tracker;
tracker.init(thread_allocator);
tracker.init(allocator::thread_allocator);
Allocator* old_allocator = allocator::thread_allocator;
allocator::thread_allocator = &tracker;
defer
Expand Down Expand Up @@ -498,7 +498,7 @@ fn void initialize_wasm_mem() @init(1) @private
if (start > mem::DEFAULT_MEM_ALIGNMENT) allocator::wasm_memory.use = start;
wasm_allocator.init(fn (x) => allocator::wasm_memory.allocate_block(x));
temp_base_allocator = &wasm_allocator;
thread_allocator = &wasm_allocator;
allocator::thread_allocator = &wasm_allocator;
}

module std::core::mem;
Expand Down

0 comments on commit bec1116

Please sign in to comment.