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
Showing
- rts/Linker.c 14 additions, 307 deletionsrts/Linker.c
- rts/ghc.mk 1 addition, 1 deletionrts/ghc.mk
- rts/linker/M32Alloc.c 345 additions, 0 deletionsrts/linker/M32Alloc.c
- rts/linker/M32Alloc.h 47 additions, 0 deletionsrts/linker/M32Alloc.h
- rts/posix/OSMem.c 6 additions, 6 deletionsrts/posix/OSMem.c
- rts/sm/OSMem.h 16 additions, 1 deletionrts/sm/OSMem.h
- rts/win32/OSMem.c 6 additions, 6 deletionsrts/win32/OSMem.c
Loading
Please register or sign in to comment