about summary refs log tree commit diff
path: root/utils/libdislocator/libdislocator.so.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/libdislocator/libdislocator.so.c')
-rw-r--r--utils/libdislocator/libdislocator.so.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/libdislocator/libdislocator.so.c b/utils/libdislocator/libdislocator.so.c
index 1b4a7316..fecf3bc6 100644
--- a/utils/libdislocator/libdislocator.so.c
+++ b/utils/libdislocator/libdislocator.so.c
@@ -520,6 +520,14 @@ size_t malloc_usable_size(const void *ptr) {
 
 }
 
+#if defined(__APPLE__)
+size_t malloc_good_size(size_t len) {
+
+  return (len & ~(ALLOC_ALIGN_SIZE - 1)) + ALLOC_ALIGN_SIZE;
+
+}
+#endif
+
 __attribute__((constructor)) void __dislocator_init(void) {
 
   char *tmp = getenv("AFL_LD_LIMIT_MB");