diff --git a/contrib/jemalloc/src/pages.c b/contrib/jemalloc/src/pages.c index 13de27a0087d..3600443e2cb5 100644 --- a/contrib/jemalloc/src/pages.c +++ b/contrib/jemalloc/src/pages.c @@ -12,6 +12,7 @@ #include #ifdef __FreeBSD__ #include +#include #endif #endif @@ -455,7 +456,10 @@ os_overcommits_sysctl(void) { } #endif - return ((vm_overcommit & 0x3) == 0); +#ifdef SWAP_RESERVE_FORCE_ON + return ((vm_overcommit & (SWAP_RESERVE_FORCE_ON | + SWAP_RESERVE_RLIMIT_ON)) == 0); +#endif } #endif