Skip to content

Commit 34a7e37

Browse files
committed
Fix pages_purge() when using MADV_DONTNEED.
This fixes a regression caused by e98a620 (Mark partially purged arena chunks as non-hugepage.).
1 parent a05d4da commit 34a7e37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ pages_purge(void *addr, size_t size)
171171
VirtualAlloc(addr, size, MEM_RESET, PAGE_READWRITE);
172172
unzeroed = true;
173173
#elif (defined(JEMALLOC_PURGE_MADVISE_FREE) || \
174-
defined(JEMALLOC_PURGE_MADVISE_FREE))
174+
defined(JEMALLOC_PURGE_MADVISE_DONTNEED))
175175
# if defined(JEMALLOC_PURGE_MADVISE_FREE)
176176
# define JEMALLOC_MADV_PURGE MADV_FREE
177177
# define JEMALLOC_MADV_ZEROS false

0 commit comments

Comments
 (0)