summaryrefslogtreecommitdiff
path: root/libraries
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 /libraries
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 'libraries')
-rw-r--r--libraries/base/GHC/RTS/Flags.hsc3
1 files changed, 3 insertions, 0 deletions
diff --git a/libraries/base/GHC/RTS/Flags.hsc b/libraries/base/GHC/RTS/Flags.hsc
index 913344c166..abff8aa1f9 100644
--- a/libraries/base/GHC/RTS/Flags.hsc
+++ b/libraries/base/GHC/RTS/Flags.hsc
@@ -138,6 +138,7 @@ data MiscFlags = MiscFlags
, generateCrashDumpFile :: Bool
, generateStackTrace :: Bool
, machineReadable :: Bool
+ , disableDelayedOsMemoryReturn :: Bool
, internalCounters :: Bool
, linkerAlwaysPic :: Bool
, linkerMemBase :: Word
@@ -447,6 +448,8 @@ getMiscFlags = do
<*> (toBool <$>
(#{peek MISC_FLAGS, machineReadable} ptr :: IO CBool))
<*> (toBool <$>
+ (#{peek MISC_FLAGS, disableDelayedOsMemoryReturn} ptr :: IO CBool))
+ <*> (toBool <$>
(#{peek MISC_FLAGS, internalCounters} ptr :: IO CBool))
<*> (toBool <$>
(#{peek MISC_FLAGS, linkerAlwaysPic} ptr :: IO CBool))