Runtime linker: Break m32 allocator out into its own file
authorErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 24 May 2016 09:26:56 +0000 (19:26 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 24 May 2016 21:32:09 +0000 (07:32 +1000)
commitfe8a4e5d77ef8b2bdb2e7e87d50eb477c94bce43
tree36b0c877bce4ecc04beb8dccc60f1209c1692dc1
parent95dfdceb8b4dcc54a366949577d9ee389bad5bc3
Runtime linker: Break m32 allocator out into its own file

This makes the code a little more modular and allows the removal of some
CPP hackery. By providing dummy implementations of of the `m32_*`
functions (which simply call `errorBelch`) it means that the call sites
for these functions are syntax checked even when `RTS_LINKER_USE_MMAP`
is `0`.

Also changes some size parameter types from `unsigned int` to `size_t`.

Test Plan: Validate on Linux, OS X and Windows

Reviewers: Phyx, hsyl20, bgamari, simonmar, austin

Reviewed By: simonmar, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2237
rts/Linker.c
rts/ghc.mk
rts/linker/M32Alloc.c [new file with mode: 0644]
rts/linker/M32Alloc.h [new file with mode: 0644]
rts/posix/OSMem.c
rts/sm/OSMem.h
rts/win32/OSMem.c