[commit: ghc] master: Two step allocator for 64-bit systems (0d1a8d0)
git at git.haskell.org
git at git.haskell.org
Wed Jul 22 16:50:13 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0d1a8d09f452977aadef7897aa12a8d41c7a4af0/ghc
>---------------------------------------------------------------
commit 0d1a8d09f452977aadef7897aa12a8d41c7a4af0
Author: Giovanni Campagna <gcampagn at cs.stanford.edu>
Date: Fri Jul 17 11:55:49 2015 +0100
Two step allocator for 64-bit systems
Summary:
The current OS memory allocator conflates the concepts of allocating
address space and allocating memory, which makes the HEAP_ALLOCED()
implementation excessively complicated (as the only thing it cares
about is address space layout) and slow. Instead, what we want
is to allocate a single insanely large contiguous block of address
space (to make HEAP_ALLOCED() checks fast), and then commit subportions
of that in 1MB blocks as we did before.
This is currently behind a flag, USE_LARGE_ADDRESS_SPACE, that is only enabled for
certain OSes.
Test Plan: validate
Reviewers: simonmar, ezyang, austin
Subscribers: thomie, carter
Differential Revision: https://phabricator.haskell.org/D524
GHC Trac Issues: #9706
>---------------------------------------------------------------
0d1a8d09f452977aadef7897aa12a8d41c7a4af0
configure.ac | 36 ++
includes/rts/storage/MBlock.h | 194 +---------
rts/Sparks.c | 1 +
rts/posix/OSMem.c | 200 +++++++++--
rts/sm/BlockAlloc.c | 14 +-
rts/sm/GC.h | 2 +
.../rts/storage/MBlock.h => rts/sm/HeapAlloc.h | 65 ++--
rts/sm/MBlock.c | 399 +++++++++++++++++++--
rts/sm/OSMem.h | 41 +++
rts/win32/OSMem.c | 77 +++-
testsuite/tests/rts/Makefile | 4 +-
testsuite/tests/rts/all.T | 7 +
testsuite/tests/rts/outofmem.stderr-ws-64 | 2 +-
testsuite/tests/rts/outofmem.stdout | 2 +-
testsuite/tests/rts/testmblockalloc.c | 75 ++++
15 files changed, 840 insertions(+), 279 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 0d1a8d09f452977aadef7897aa12a8d41c7a4af0
More information about the ghc-commits
mailing list