Skip to content

Commit 1b97274

Browse files
committed
Use MADV_FREE instead of MADV_DONTNEED
1 parent 5088f40 commit 1b97274

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

contrib/jemalloc-cmake/include_linux_aarch64/jemalloc/internal/jemalloc_internal_defs.h.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,11 @@
279279
* MADV_FREE, though typically with higher
280280
* system overhead.
281281
*/
282+
#if defined(__linux__)
282283
#define JEMALLOC_PURGE_MADVISE_FREE
284+
#else
283285
#define JEMALLOC_PURGE_MADVISE_DONTNEED
284-
#define JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS
286+
#endif
285287

286288
/* Defined if madvise(2) is available but MADV_FREE is not (x86 Linux only). */
287289
/* #undef JEMALLOC_DEFINE_MADVISE_FREE */

contrib/jemalloc-cmake/include_linux_x86_64/jemalloc/internal/jemalloc_internal_defs.h.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,11 @@
279279
* MADV_FREE, though typically with higher
280280
* system overhead.
281281
*/
282+
#if defined(__linux__)
282283
#define JEMALLOC_PURGE_MADVISE_FREE
284+
#else
283285
#define JEMALLOC_PURGE_MADVISE_DONTNEED
284-
#define JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS
286+
#endif
285287

286288
/* Defined if madvise(2) is available but MADV_FREE is not (x86 Linux only). */
287289
/* #undef JEMALLOC_DEFINE_MADVISE_FREE */

0 commit comments

Comments
 (0)