Add RTS flag to disable 1TB address space allocation
GHC 8.0 changed the default behaviour on Linux to allocate 1 TB virtual memory for Haskell programs (#9706 (closed)).
While shown to be good for performance (a small percentage gain), it has created me a couple problems, especially when:
- trying to disable overcommit in Linux to get more reliable memory behaviour and avoid swapping / the OOM-killer (all Haskell programs crash at startup)
- and in debugging (e.g. #14192 (closed))
Currently you can turn that feature off only via a compile-time switch, e.g.
I'd like to request to make it possible to turn this behaviour off at run-time with an RTS flag, so that when the flag is given, it uses the old block-allocator.
|CC||ezyang, gcampax, nh2, simonmar|