[RuntimeDyld] Add alignment arguments to the reserveAllocationSpace method of
authorLang Hames <lhames@gmail.com>
Sun, 10 Jan 2016 18:51:50 +0000 (18:51 +0000)
committerLang Hames <lhames@gmail.com>
Sun, 10 Jan 2016 18:51:50 +0000 (18:51 +0000)
commitcb4ab730d69bd35072edf024c59c630ffb89f4aa
treefef9d32a7928f01f67873a00e10c131c08694c74
parent1f644cd56aa74ab04b02d7415e940a7be9e6f39e
[RuntimeDyld] Add alignment arguments to the reserveAllocationSpace method of
RuntimeDyld::MemoryManager.

The RuntimeDyld::MemoryManager::reserveAllocationSpace method is called when
object files are loaded, and gives clients a chance to pre-allocate memory for
all segments. Previously only the size of each segment (code, ro-data, rw-data)
was supplied but not the alignment. This hasn't caused any problems so far, as
most clients allocate via the MemoryBlock interface which returns page-aligned
blocks. Adding alignment arguments enables finer grained allocation while still
satisfying alignment restrictions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257294 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ExecutionEngine/RuntimeDyld.h
lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp