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.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/memory_allocator.zig b/src/memory_allocator.zig
index a8fbd116a..cb73bfb89 100644
--- a/src/memory_allocator.zig
+++ b/src/memory_allocator.zig
@@ -109,6 +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_is_in_heap_region(buf.ptr));
mimalloc.mi_free_size(buf.ptr, buf.len);
} else {
mimalloc.mi_free(buf.ptr);