aboutsummaryrefslogtreecommitdiff
path: root/src/memory_allocator.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/memory_allocator.zig')
-rw-r--r--src/memory_allocator.zig4
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);
}