Skip to content

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. ./configure --disable-large-address-space.

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.

Trac metadata
Trac field Value
Version 8.0.2
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC ezyang, gcampax, nh2, simonmar
Operating system
Architecture
Edited by Niklas Hambüchen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information