diff --git a/src/pages.c b/src/pages.c index 9846e19e..fa986ba6 100644 --- a/src/pages.c +++ b/src/pages.c @@ -180,15 +180,15 @@ pages_purge_lazy(void *addr, size_t size) { #ifdef _WIN32 VirtualAlloc(addr, size, MEM_RESET, PAGE_READWRITE); + return false; #elif defined(JEMALLOC_PURGE_MADVISE_FREE) - madvise(addr, size, MADV_FREE); + return (madvise(addr, size, MADV_FREE) != 0); #elif defined(JEMALLOC_PURGE_MADVISE_DONTNEED) && \ !defined(JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS) - madvise(addr, size, MADV_DONTNEED); + return (madvise(addr, size, MADV_DONTNEED) != 0); #else not_reached(); #endif - return false; } bool