Fix rpmalloc on android.

This commit is contained in:
Bartosz Taudul 2020-03-02 17:10:47 +01:00
parent 2b584a94c5
commit f945278959

View File

@ -2102,9 +2102,11 @@ _memory_unmap_os(void* address, size_t size, size_t offset, size_t release) {
#if defined(POSIX_MADV_FREE) #if defined(POSIX_MADV_FREE)
if (posix_madvise(address, size, POSIX_MADV_FREE)) if (posix_madvise(address, size, POSIX_MADV_FREE))
#endif #endif
#if defined(POSIX_MADV_DONTNEED)
if (posix_madvise(address, size, POSIX_MADV_DONTNEED)) { if (posix_madvise(address, size, POSIX_MADV_DONTNEED)) {
assert("Failed to madvise virtual memory block as free" == 0); assert("Failed to madvise virtual memory block as free" == 0);
} }
#endif
} }
#endif #endif
#endif #endif