From 64871b2bfbfa31e99d66ea875847df603dbdc5bd Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Fri, 25 Nov 2022 00:14:01 -0800 Subject: [PATCH] Fix spurious assertion --- src/memory_allocator.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memory_allocator.zig b/src/memory_allocator.zig index e131a76dac..9918c9c458 100644 --- a/src/memory_allocator.zig +++ b/src/memory_allocator.zig @@ -109,7 +109,7 @@ const CAllocator = struct { // so it's faster if we don't pass that value through // but its good to have that assertion if (comptime Environment.allow_assert) { - assert(mimalloc.mi_check_owned(buf.ptr)); + assert(mimalloc.mi_is_in_heap_region(buf.ptr)); mimalloc.mi_free_size_aligned(buf.ptr, buf.len, buf_align); } else { mimalloc.mi_free(buf.ptr);