summaryrefslogtreecommitdiff
path: root/rts/RtsFlags.c
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2019-10-29 12:54:10 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-11-01 23:12:17 -0400
commit9980fb58f613ee3363c7e4cb86453e542c6c69aa (patch)
tree67f0e195dd71510d1d797ce5e07f422401269b90 /rts/RtsFlags.c
parent01006bc79582616c9bbc842b397e85437a57ac18 (diff)
downloadhaskell-9980fb58f613ee3363c7e4cb86453e542c6c69aa.tar.gz
Add +RTS --disable-delayed-os-memory-return. Fixes #17411.
Sets `MiscFlags.disableDelayedOsMemoryReturn`. See the added `Note [MADV_FREE and MADV_DONTNEED]` for details.
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r--rts/RtsFlags.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 0e28b980ac..7949d401db 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -243,6 +243,7 @@ void initRtsFlagsDefaults(void)
RtsFlags.MiscFlags.generate_stack_trace = true;
RtsFlags.MiscFlags.generate_dump_file = false;
RtsFlags.MiscFlags.machineReadable = false;
+ RtsFlags.MiscFlags.disableDelayedOsMemoryReturn = false;
RtsFlags.MiscFlags.internalCounters = false;
RtsFlags.MiscFlags.linkerAlwaysPic = DEFAULT_LINKER_ALWAYS_PIC;
RtsFlags.MiscFlags.linkerMemBase = 0;
@@ -914,6 +915,11 @@ error = true;
OPTION_UNSAFE;
RtsFlags.MiscFlags.machineReadable = true;
}
+ else if (strequal("disable-delayed-os-memory-return",
+ &rts_argv[arg][2])) {
+ OPTION_UNSAFE;
+ RtsFlags.MiscFlags.disableDelayedOsMemoryReturn = true;
+ }
else if (strequal("internal-counters",
&rts_argv[arg][2])) {
OPTION_SAFE;