diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-10-28 13:37:39 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-11-01 04:55:24 -0400 |
commit | c6759080a91804266feb0e4e3a2c614f330649f5 (patch) | |
tree | 51fa5e23839ab359c6f8995fe400c27269b3f136 /rts/linker/LoadArchive.c | |
parent | 70b62c97622f6527cf606af052fb1f0f14783b28 (diff) | |
download | haskell-c6759080a91804266feb0e4e3a2c614f330649f5.tar.gz |
rts: Make m32 allocator per-ObjectCode
MacOS Catalina is finally going to force our hand in forbidden writable
exeutable mappings. Unfortunately, this is quite incompatible with the
current global m32 allocator, which mixes symbols from various objects
in a single page. The problem here is that some of these symbols may not
yet be resolved (e.g. had relocations performed) as this happens lazily
(and therefore we can't yet make the section read-only and therefore
executable).
The easiest way around this is to simply create one m32 allocator per
ObjectCode. This may slightly increase fragmentation for short-running
programs but I suspect will actually improve fragmentation for programs
doing lots of loading/unloading since we can always free all of the
pages allocated to an object when it is unloaded (although this ability
will only be implemented in a later patch).
Diffstat (limited to 'rts/linker/LoadArchive.c')
-rw-r--r-- | rts/linker/LoadArchive.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/rts/linker/LoadArchive.c b/rts/linker/LoadArchive.c index a92f86fff0..936c0e5261 100644 --- a/rts/linker/LoadArchive.c +++ b/rts/linker/LoadArchive.c @@ -616,9 +616,6 @@ fail: #endif } - if (RTS_LINKER_USE_MMAP) - m32_allocator_flush(); - DEBUG_LOG("done\n"); return retcode; } |