diff options
author | 2022-11-24 18:57:40 -0800 | |
---|---|---|
committer | 2022-11-24 18:57:40 -0800 | |
commit | 47f0e14477721a0c1c9f5458208c632fc2e4a370 (patch) | |
tree | 47278bf3926be48e1b2c3d8d3eb6210ca22a9617 /src/memory_allocator.zig | |
parent | 0ef25c65ecda54c38064f2e698bb80d642431fbe (diff) | |
download | bun-47f0e14477721a0c1c9f5458208c632fc2e4a370.tar.gz bun-47f0e14477721a0c1c9f5458208c632fc2e4a370.tar.zst bun-47f0e14477721a0c1c9f5458208c632fc2e4a370.zip |
Use is_in_heap_region instead of _check_owned
Diffstat (limited to 'src/memory_allocator.zig')
-rw-r--r-- | src/memory_allocator.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/memory_allocator.zig b/src/memory_allocator.zig index cb73bfb89..e131a76da 100644 --- a/src/memory_allocator.zig +++ b/src/memory_allocator.zig @@ -109,8 +109,8 @@ 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_is_in_heap_region(buf.ptr)); - mimalloc.mi_free_size(buf.ptr, buf.len); + assert(mimalloc.mi_check_owned(buf.ptr)); + mimalloc.mi_free_size_aligned(buf.ptr, buf.len, buf_align); } else { mimalloc.mi_free(buf.ptr); } |