From aca48ee3f593d3436cec8c5fc65f54ce0c07def2 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sat, 29 Jul 2023 04:25:37 -0700 Subject: [PATCH] Update wtf-bindings.cpp --- src/bun.js/bindings/wtf-bindings.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/bun.js/bindings/wtf-bindings.cpp b/src/bun.js/bindings/wtf-bindings.cpp index 5bc37467a1..d2e8d8b226 100644 --- a/src/bun.js/bindings/wtf-bindings.cpp +++ b/src/bun.js/bindings/wtf-bindings.cpp @@ -29,19 +29,7 @@ extern "C" void* bun__bmalloc__realloc(void* ptr, size_t size) extern "C" size_t bun__bmalloc__size(void* ptr) { - return bmalloc_get_allocationpub fn isHeapMemory(memory - : anytype) bool - { - if (comptime use_mimalloc) { - const Memory = @TypeOf(memory); - if (comptime std.meta.trait.isSingleItemPtr(Memory)) { - return Mimalloc.mi_is_in_heap_region(memory); - } - return Mimalloc.mi_is_in_heap_region(std.mem.sliceAsBytes(memory).ptr); - } - return false; - } - _size(ptr); + return bmalloc_get_allocation_size(ptr); } extern "C" double WTF__parseDouble(const LChar* string, size_t length, size_t* position)