jemalloc: use symbolic definitions for bits in vm_overcommit
Reviewed by: brooks, imp (previous version) Discussed with: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D36540
This commit is contained in:
parent
26eed2aa06
commit
87384c51e0
@ -12,6 +12,7 @@
|
||||
#include <sys/sysctl.h>
|
||||
#ifdef __FreeBSD__
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/vm.h>
|
||||
#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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user