X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..eee3565979933af707c711411001ba11fe406a3c:/libsyscall/wrappers/legacy/munmap.c diff --git a/libsyscall/wrappers/legacy/munmap.c b/libsyscall/wrappers/legacy/munmap.c index 24b5b5eaa..3a69297eb 100644 --- a/libsyscall/wrappers/legacy/munmap.c +++ b/libsyscall/wrappers/legacy/munmap.c @@ -29,6 +29,8 @@ #include #include #include +#include +#include "stack_logging_internal.h" /* * Stub function to account for the differences in standard compliance @@ -59,7 +61,13 @@ munmap(void *addr, size_t len) offset = ((uintptr_t) addr) & PAGE_MASK; addr = (void *) (((uintptr_t) addr) & ~PAGE_MASK); len += offset; - return __munmap(addr, len); -} + int result = __munmap(addr, len); + + if (__syscall_logger) { + __syscall_logger(stack_logging_type_vm_deallocate, (uintptr_t)mach_task_self(), (uintptr_t)addr, len, 0, 0); + } + + return result; +} #endif /* NO_SYSCALL_LEGACY */