Fix pages_purge() when using MADV_DONTNEED.

This fixes a regression caused by
e98a620c59 (Mark partially purged arena
chunks as non-hugepage.).
This commit is contained in:
Jason Evans 2016-12-03 16:06:19 -08:00
parent a05d4da4d8
commit 34a7e37a71

View File

@ -171,7 +171,7 @@ pages_purge(void *addr, size_t size)
VirtualAlloc(addr, size, MEM_RESET, PAGE_READWRITE); VirtualAlloc(addr, size, MEM_RESET, PAGE_READWRITE);
unzeroed = true; unzeroed = true;
#elif (defined(JEMALLOC_PURGE_MADVISE_FREE) || \ #elif (defined(JEMALLOC_PURGE_MADVISE_FREE) || \
defined(JEMALLOC_PURGE_MADVISE_FREE)) defined(JEMALLOC_PURGE_MADVISE_DONTNEED))
# if defined(JEMALLOC_PURGE_MADVISE_FREE) # if defined(JEMALLOC_PURGE_MADVISE_FREE)
# define JEMALLOC_MADV_PURGE MADV_FREE # define JEMALLOC_MADV_PURGE MADV_FREE
# define JEMALLOC_MADV_ZEROS false # define JEMALLOC_MADV_ZEROS false