• Simon Marlow's avatar
    Attempt to fix #2512 and #2063; add +RTS -xm<address> -RTS option · 11f6f411
    Simon Marlow authored
    On x86_64, the RTS needs to allocate memory in the low 2Gb of the
    address space.  On Linux we can do this with MAP_32BIT, but sometimes
    this doesn't work (#2512) and other OSs don't support it at all
    (#2063).  So to work around this:
    
      - Try MAP_32BIT first, if available.
    
      - Otherwise, try allocating memory from a fixed address (by default
        1Gb)
    
      - We now provide an option to configure the address to allocate
        from.  This allows a workaround on machines where the default
        breaks, and also provides a way for people to test workarounds
        that we can incorporate in future releases.
    11f6f411
RtsFlags.c 76.6 KB