aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2022-09-16 21:08:03 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2022-09-16 22:35:35 +0000
commit0e2af3b59a1517521e9fb3aab61fa06e5ce25c2c (patch)
tree2634cf0eaa34d61e963e9a8aab3e9de50a9d0af2
parenta09bb0ed18f64f9a527b0fb8fe9f0d7b7d627145 (diff)
downloadsrc-0e2af3b59a1517521e9fb3aab61fa06e5ce25c2c.tar.gz
src-0e2af3b59a1517521e9fb3aab61fa06e5ce25c2c.zip
jemalloc: Define SWAP_RESERVE_* if not provided by the system headers
instead ifdef-ing out the return statement. Reported by: Mark Millard <marklmi@yahoo.com> Fixes: 87384c51e047 Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
-rw-r--r--contrib/jemalloc/src/pages.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/jemalloc/src/pages.c b/contrib/jemalloc/src/pages.c
index 6b00eb0cb919..6405bb528984 100644
--- a/contrib/jemalloc/src/pages.c
+++ b/contrib/jemalloc/src/pages.c
@@ -464,10 +464,12 @@ os_overcommits_sysctl(void) {
}
#endif
-#ifdef SWAP_RESERVE_FORCE_ON
+#ifndef SWAP_RESERVE_FORCE_ON
+#define SWAP_RESERVE_FORCE_ON (1 << 0)
+#define SWAP_RESERVE_RLIMIT_ON (1 << 1)
+#endif
return ((vm_overcommit & (SWAP_RESERVE_FORCE_ON |
SWAP_RESERVE_RLIMIT_ON)) == 0);
-#endif
}
#endif