Nim/lib/pure
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
..
collections Merge branch 'devel' into sorted_deduplicate 2018-12-12 16:29:46 +01:00
concurrency manual: Fix links to Parallel & Spawn (#9342) 2018-10-13 08:55:34 +02:00
includes os.nim: big refactoring, use the new pathnorm that was extracted by compiler/pathutils.nim; added os.relativePath 2018-12-13 12:05:50 +01:00
ioselects fixes #7667; underlying issue is that dot calls in generics have no concept of 'friend' symbols, will be addressed later 2018-10-29 13:46:55 +01:00
unidecode fixes #8768 properly 2018-08-30 16:54:03 +02:00
algorithm.nim 8684 add shortcut sort procs (#9174) 2018-10-11 22:51:23 +02:00
async.nim Unify async macro and futures for js and native targets 2018-01-05 16:40:51 +02:00
asyncdispatch.nim Merge async common into asyncdispatch. 2018-12-07 22:47:10 +00:00
asyncdispatch.nim.cfg
asyncfile.nim Added FileMode to comment on asyncfile openAsync (#8008) 2018-06-11 00:53:42 -04:00
asyncftpclient.nim asyncftpclient: add missing file.close to retrFile 2018-07-02 18:07:24 +02:00
asyncfutures.nim complete future only once in or (fixes #8982) (#9632) 2018-11-09 22:45:17 +00:00
asynchttpserver.nim Change parseEnum to something faster for method parsing in asynchttpserver (#7682) 2018-06-08 21:34:19 +01:00
asyncmacro.nim asyncmacro: add nnkSym support for getName() (#9204) 2018-10-09 15:53:13 +02:00
asyncnet.nim Merge pull request #9915 from zevv/asyncnet-unix 2018-12-12 23:06:08 +00:00
asyncstreams.nim Fixes #8994. FutureStream read procedure data loss no longer occurs. (#9183) 2018-10-09 19:39:12 +02:00
base64.nim make more tests green 2018-04-30 02:52:58 +02:00
bitops.nim bitops: add 'hamming weight' to the doc index 2017-12-03 15:20:50 +01:00
browsers.nim Don't run "kde-open" and "gnome-open" under Unix (#6426) 2017-11-19 03:29:26 +01:00
cgi.nim Add readData proc that accepts a string. 2018-11-07 11:26:51 +01:00
colors.nim stdlib: documenation updates, the exception names have been changed 2018-10-25 07:42:45 +02:00
complex.nim fix #9639 (#9640) 2018-11-07 10:58:48 +01:00
cookies.nim make more tests green 2018-04-30 02:52:58 +02:00
coro.nim coro: minor documentation fix [backport] [ci skip] 2018-11-11 10:16:32 +01:00
coro.nimcfg fix test failure in coro.nim 2015-10-01 12:05:45 -07:00
cstrutils.nim move eqIdent to vm.nim (#7585) 2018-04-15 23:38:43 +02:00
db_common.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
distros.nim Haiku support for Nim (#8542) 2018-08-14 09:35:07 +02:00
dynlib.nim Nintendo switch support (#8069) 2018-06-27 12:35:09 +02:00
encodings.nim removes deprecated T/P types 2018-11-16 13:27:56 +01:00
endians.nim Make the swap procs safe for unaligned input ptrs (#9210) 2018-10-18 14:30:31 +02:00
events.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
fenv.nim Haiku support for Nim (#8542) 2018-08-14 09:35:07 +02:00
future.nim renamed future.nim to sugar.nim 2018-04-06 11:59:49 +02:00
hashes.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
htmlgen.nim HTMLGen Update, Add runnableExamples, Add HTML Tags center, details, dialog, marquee, picture, slot, summary (#9252) 2018-10-09 13:13:13 +02:00
htmlparser.nim Add parsing empty attribs to htmlparser (#9559) 2018-10-30 06:58:39 +01:00
httpclient.nim Merge pull request #9548 from tonygparsehub/put-delete 2018-11-23 22:45:28 +00:00
httpcore.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
httpserver.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
json.nim [docs/json]: expands existing examples + shows {} operator in action (#9157) 2018-10-02 20:47:21 -07:00
lenientops.nim rename SomeReal to SomeFloat (#7617) 2018-04-15 19:59:11 +02:00
lexbase.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
logging.nim write logs to stderr instead of stdout; fixes #9547 (#9554) 2018-10-30 07:36:31 +01:00
marshal.nim stdlib: documenation updates, the exception names have been changed 2018-10-25 07:42:45 +02:00
matchers.nim make more tests green 2018-04-30 02:52:58 +02:00
math.nim Fix #9585 hypot in js 2018-10-31 14:09:39 +02:00
md5.nim prepared stdlb for new integer arithmetic rules 2017-09-16 10:57:21 +02:00
memfiles.nim Allow an escape hatch for platform specific flags/default override (#9968) 2018-12-14 11:44:11 +01:00
mersenne.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
mimetypes.nim Add application/wasm to mimetypes.nim (#8389) 2018-07-21 21:42:07 +02:00
nativesockets.nim Merge pull request #9915 from zevv/asyncnet-unix 2018-12-12 23:06:08 +00:00
net.nim Merge pull request #9915 from zevv/asyncnet-unix 2018-12-12 23:06:08 +00:00
nimprof.nim Minor bug fix (#9430) 2018-10-19 11:45:59 +02:00
nimprof.nim.cfg
nimtracker.nim make memory tracker work without onThreadCreation 2017-03-14 15:45:35 +01:00
oids.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
options.nim Make options.UnpackError inherit from system.Defect 2018-12-08 10:04:53 +01:00
os.nim os.nim: use the new pathnorm.normalizePath implementation 2018-12-14 08:57:55 +01:00
osproc.nim address comments 2018-12-04 02:51:27 -08:00
oswalkdir.nim Add copyright header 2016-07-21 08:53:10 +01:00
parsecfg.nim Testament: refactoring; makes the test joiner green 2018-12-11 21:23:23 +01:00
parsecsv.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
parsejson.nim move parsejson logic into its own standard lib module 2018-05-18 01:49:49 +02:00
parseopt.nim added parseopt.remainingArgs; refs #9951 2018-12-14 11:41:19 +01:00
parseopt2.nim WIP: disallow 'nil' for strings and seqs 2018-08-13 11:41:33 +02:00
parsesql.nim removes deprecated T/P types 2018-11-16 13:27:56 +01:00
parseutils.nim Update parseutils.nim 2018-12-05 11:27:22 -08:00
parsexml.nim Add parsing empty attribs to htmlparser (#9559) 2018-10-30 06:58:39 +01:00
pathnorm.nim os.nim: use the new pathnorm.normalizePath implementation 2018-12-14 08:57:55 +01:00
pegs.nim removes deprecated T/P types 2018-11-16 13:27:56 +01:00
punycode.nim Add copyright header 2016-07-21 08:52:39 +01:00
random.nim updated tests to be executed 2018-11-23 11:58:28 +01:00
rationals.nim Support div, mod, floorDiv and floorMod for Rationals (#7918) 2018-06-01 11:19:25 -04:00
ropes.nim Fixes ropes regressions due to the not-nil strings (#8687) 2018-08-20 16:55:22 +02:00
scgi.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
securehash.nim move new sha1 module into the new 'std' namespace 2018-02-06 17:40:31 +01:00
segfaults.nim fixes #5599 (#5610) 2017-03-26 09:30:59 +02:00
selectors.nim Allow async stdin 2018-07-25 09:07:50 +03:00
smtp.nim fixes #9728 2018-11-16 11:30:34 +01:00
smtp.nim.cfg
stats.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
streams.nim stdlib: documenation updates, the exception names have been changed 2018-10-25 07:42:45 +02:00
strformat.nim New implementations of times.parse & times.format (#8094) 2018-07-09 20:04:25 +02:00
strmisc.nim Add runnable examples for strmisc procs and a better doc for expandTabs 2018-10-29 04:59:05 +01:00
strscans.nim Fix strscans.scanp (#9518) 2018-10-28 13:35:30 +01:00
strtabs.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
strutils.nim removes deprecated T/P types 2018-11-16 13:27:56 +01:00
subexes.nim refs #9880 show index and bound in lots of index out of bounds errors 2018-12-09 16:50:45 -08:00
sugar.nim fixes #9540 2018-10-29 10:06:36 +01:00
terminal.nim removes deprecated T/P types 2018-11-16 13:27:56 +01:00
times.nim times.nim: Minor formatting change in the example code 2018-12-04 22:41:06 +01:00
typetraits.nim typetraits: Dots for sentence endings. 2018-09-15 20:32:11 +02:00
unicode.nim fixes #9800 (#9804) [backport] 2018-11-26 18:59:24 +01:00
unittest.nim Give error when case has an else branch even though all cases are already covered (#9930) 2018-12-13 09:08:10 +01:00
uri.nim Don't prevent ',' from getting escaped in theindex.html 2018-09-28 15:39:22 -04:00
volatile.nim Add volatile load/store (#5263) 2017-01-25 20:02:19 +01:00
xmlparser.nim remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
xmltree.nim [cleanup] remove xmldom and xmldomparser (#9234) 2018-10-09 20:58:56 +02:00