]> granicus.if.org Git - llvm/commit
[JITLink] Switch to slab allocation for InProcessMemoryManager, re-enable test.
authorLang Hames <lhames@gmail.com>
Tue, 15 Oct 2019 21:06:57 +0000 (21:06 +0000)
committerLang Hames <lhames@gmail.com>
Tue, 15 Oct 2019 21:06:57 +0000 (21:06 +0000)
commit812ac4e981b0628ea7e2dd62ef485c7536252d1b
treeb31ab02f7144512ebbcf5e7b5cfb331bcec71a85
parent24b3237135b08fe80adfb4d7d2c1a7221f9dbae9
[JITLink] Switch to slab allocation for InProcessMemoryManager, re-enable test.

InProcessMemoryManager used to make separate memory allocation calls for each
permission level (RW, RX, RO), which could lead to target-out-of-range errors
if data and code were placed too far apart (this was the source of failures in
the JITLink/AArch64 testcase when it was first landed).

This patch updates InProcessMemoryManager to allocate a single slab which is
subdivided between text and data. This should guarantee that accesses remain
in-range provided that individual object files do not exceed 1Mb in size.
This patch also re-enables the JITLink/AArch64 testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374948 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp
test/ExecutionEngine/JITLink/AArch64/lit.local.cfg