diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2015-08-25 02:07:45 +0000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2015-08-29 02:50:54 +1000 |
commit | 38c98e4f61a48084995a5347d76ddd024ce1a09c (patch) | |
tree | 46cb9ff82f283ee456839fb6d84e7f72d998fdf1 /rts | |
parent | 15c63d2ac1983a72de20ec83b7263bf12b79ae49 (diff) | |
download | haskell-38c98e4f61a48084995a5347d76ddd024ce1a09c.tar.gz |
RTS: Reduce MBLOCK_SPACE_SIZE on AArch64
Commit 0d1a8d09f4 added a two step allocator for 64 bit systems. This
allocator mmaps a huge (1 TB) chunk of memory out of which it does
smaller allocations. On AArch64/Arm64 linux, this mmap was failing
due to the Arm64 Linux kernel parameter CONFIG_ARM64_VA_BITS
defaulting to 39 bits.
Therefore reducing the AArch64 value for MBLOCK_SPACE_SIZE to make
this allocation 1/4 TB while remaining 1 TB for other archs.
Reviewers: ezyang, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1171
GHC Trac Issues: #10682
Diffstat (limited to 'rts')
-rw-r--r-- | rts/sm/HeapAlloc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/sm/HeapAlloc.h b/rts/sm/HeapAlloc.h index c914b5db40..f2760bdaf7 100644 --- a/rts/sm/HeapAlloc.h +++ b/rts/sm/HeapAlloc.h @@ -52,7 +52,12 @@ #ifdef USE_LARGE_ADDRESS_SPACE extern W_ mblock_address_space_begin; +#if aarch64_HOST_ARCH +# define MBLOCK_SPACE_SIZE ((StgWord)1 << 38) /* 1/4 TB */ +#else # define MBLOCK_SPACE_SIZE ((StgWord)1 << 40) /* 1 TB */ +#endif + # define HEAP_ALLOCED(p) ((W_)(p) >= mblock_address_space_begin && \ (W_)(p) < (mblock_address_space_begin + \ MBLOCK_SPACE_SIZE)) |