Nim/lib
c-blake a54e3f4602 Allow an escape hatch for platform specific flags/default override (#9968)
* Allow an escape hatch for platform specific flags (of which there are many,
for example MAP_POPULATE itself is a Linux-only thing, not other Unix).

Continue with same defaults as before in this commit, but that really
should be changed to *not* include MAP_POPULATE.  While pre-faulting
all the pages can be useful sometimes *if* you know you're going to
access all the data, it is highly unlikely to be what users expect the
default to be.  For some things all that up front work is 1000s of
times slower than being lazy/on-demand/only ever faulting parts of the
file.  Even the MAP_POPULATE fan who originally in 2014 committed to
this file defaulted it to off (but turned it always-on as a "temporary"
work around for some long since gone/mutated compiler issue).

Anyway, at least something like this `mapFlags` gives users the ability
to override the poor default choice or activate any other idiosyncratic
platform-specific features.

* Use simple, efficient default flags, but also accept whatever the open/mapMem
caller specifies.  Save flags in MemFile so they can be used in `resize`.

This field should not need exporting like the others -- callers can always
save whatever values they pass -- but we include a cautionary comment in
case anyone ever asks for a `*` there, as well as for documentation.

Also make documentation for ``mapFlags`` in open more likely to inspire care.
2018-12-14 11:44:11 +01:00
..
arch/x86 Coroutine rework. 2017-02-20 17:24:19 +02:00
core hotfix: discriminants can be of size 8 bytes [backport] 2018-12-05 09:43:59 +01:00
deprecated Give error when case has an else branch even though all cases are already covered (#9930) 2018-12-13 09:08:10 +01:00
experimental move diff.nim to experimental 2018-12-12 17:48:30 +01:00
genode Native access to Genode environment 2018-06-07 07:21:20 +02:00
genode_cpp Native access to Genode environment 2018-06-07 07:21:20 +02:00
impure Rework nil/option for nre in light of ""==nil 2018-12-11 22:15:57 +00:00
js Support only some types as JsAssoc types (#8627) 2018-11-23 15:05:15 +01:00
nintendoswitch Rewrite the memory management code for Nintendo Switch (#8169) 2018-07-05 16:33:15 +02:00
packages/docutils Moves fsmonitor into graveyard. Fixes #6718. (#9529) 2018-10-28 13:37:51 +01:00
posix Merge pull request #9862 from zevv/posix-cmsg 2018-12-05 08:11:27 +01:00
pure Allow an escape hatch for platform specific flags/default override (#9968) 2018-12-14 11:44:11 +01:00
std move diff.nim to experimental 2018-12-12 17:48:30 +01:00
system timers.nim: avoid parser warning 2018-12-14 09:56:43 +01:00
windows removes deprecated T/P types 2018-11-16 13:27:56 +01:00
wrappers removes deprecated T/P types 2018-11-16 13:27:56 +01:00
cycle.h
nimbase.h define NIM_NIL nullptr when __cplusplus >= 201103L 2018-10-08 14:05:43 +02:00
nimrtl.nim more tests fixed 2018-11-23 11:58:29 +01:00
nimrtl.nim.cfg
prelude.nim
stdlib.nimble attempt to make the build green again 2017-01-07 02:55:15 +01:00
system.nim hotfix: discriminants can be of size 8 bytes [backport] 2018-12-05 09:43:59 +01:00