Araq/Nimrod — pull request #1405 by boydgreenfield (2014-07-23 18:42:32+00:00)
Title: Add mmap map populate

This pull request adds the MAP_POPULATE posix flag and automatically uses it for both private (MAP_PRIVATE) and shared (MAP_SHARED) mappings using `memfiles.open` and `memfiles.mapMem` procs. Note that this is *always* used and so does not modify the interface of either `memfiles.open` or `memfiles.mapMem`.

I've tested this on Linux (Ubuntu 14.04) and OSX, but not yet on Windows (though I don't believe this should impact Windows as that case is handled separately by `when defined(windows)` sections.

Before merging, we should (happy to take the lead here):
* Ensure that this doesn't break any tests (for all supported systems)
* Decide if the desired change is to always enable MAP_POPULATE, or alternatively we should add an optional argument to `memfiles.open` and `memfiles.mapMem` like `use_map_populate` that defaults to `false`. Note that I sketched such an interface here in a prior commit (cba75db), but reverted it (272fd42) because it did not properly compile (it attempted to just set the posix value MAP_POPULATE to 0 is `use_map_populate = false`).