mem: FreeBSD does not provide MAP_NORESERVE either

Like OS X, FreeBSD does not support MAP_NORESERVE.
Handle accordingly and update comment.

Committed by Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Bjoern A. Zeeb 2016-04-15 10:02:58 -05:00
parent 1b46c175fc
commit bc45e930e4

View file

@ -59,10 +59,10 @@
/** /**
* On Linux, MAP_NORESERVE allow us to simulate a very large memory * On Linux, MAP_NORESERVE allow us to simulate a very large memory
* without committing to actually providing the swap space on the * without committing to actually providing the swap space on the
* host. On OSX the MAP_NORESERVE flag does not exist, so simply make * host. On FreeBSD or OSX the MAP_NORESERVE flag does not exist,
* it 0. * so simply make it 0.
*/ */
#if defined(__APPLE__) #if defined(__APPLE__) || defined(__FreeBSD__)
#ifndef MAP_NORESERVE #ifndef MAP_NORESERVE
#define MAP_NORESERVE 0 #define MAP_NORESERVE 0
#endif #endif