Skip to content

Commit 818e25a

Browse files
committed
malloc hook for darwin malloc_usable_size equivalent
1 parent 5dc05d2 commit 818e25a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/malloc_hook.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ EXTERNAL_API void *memalign(size_t alignment, size_t s) {
7979
EXTERNAL_API size_t malloc_usable_size(const void *ptr) {
8080
return iso_chunksz((void *) ptr);
8181
}
82+
#elif __APPLE__
83+
EXTERNAL_API size_t malloc_size(const void *ptr) {
84+
return iso_chunksz((void *) ptr);
85+
}
8286
#else
8387
EXTERNAL_API size_t malloc_usable_size(void *ptr) {
8488
return iso_chunksz(ptr);

0 commit comments

Comments
 (0)