Attempt to fix #2512 and #2063; add +RTS -xm<address> -RTS option
authorSimon Marlow <marlowsd@gmail.com>
Mon, 17 Nov 2008 12:05:56 +0000 (12:05 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 17 Nov 2008 12:05:56 +0000 (12:05 +0000)
commit11f6f411b4a15b333423715b41b498f5f7745933
treeef22fbd4c7f63372dbb7185fe57a17f7e5397be7
parentcb90532723bd5801b8ac29973dd14e8e30b1e0a9
Attempt to fix #2512 and #2063;  add +RTS -xm<address> -RTS option
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.
docs/users_guide/runtime_control.xml
includes/RtsFlags.h
rts/Linker.c
rts/RtsFlags.c