aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lli/RecordingMemoryManager.h
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2013-02-25 23:00:19 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2013-02-25 23:00:19 +0000
commitb90cc2fa0b50321e32786e87f8425658d88982ee (patch)
treec21b70a3a125a559b61ab3cd9830416e5de5ab55 /tools/lli/RecordingMemoryManager.h
parentffa1dbadaf73d5b80a2bdf421c16cba29aea80a3 (diff)
downloadexternal_llvm-b90cc2fa0b50321e32786e87f8425658d88982ee.zip
external_llvm-b90cc2fa0b50321e32786e87f8425658d88982ee.tar.gz
external_llvm-b90cc2fa0b50321e32786e87f8425658d88982ee.tar.bz2
Provide workaround for PR 15130.
This changes the RecordingMemoryManager in lli to use mapped memory rather than malloc to allocate memory for sections and uses a 'near' MemoryBlock to keep the allocations together. This works around a problem in MCJIT where relocations are applied to a generated image immediately oupon generation, which isn't appropriate for the remote case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176057 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli/RecordingMemoryManager.h')
-rw-r--r--tools/lli/RecordingMemoryManager.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/lli/RecordingMemoryManager.h b/tools/lli/RecordingMemoryManager.h
index 85bf4e1..991f535 100644
--- a/tools/lli/RecordingMemoryManager.h
+++ b/tools/lli/RecordingMemoryManager.h
@@ -31,6 +31,12 @@ private:
SmallVector<Allocation, 16> AllocatedDataMem;
SmallVector<Allocation, 16> AllocatedCodeMem;
+ // FIXME: This is part of a work around to keep sections near one another
+ // when MCJIT performs relocations after code emission but before
+ // the generated code is moved to the remote target.
+ sys::MemoryBlock Near;
+ sys::MemoryBlock allocateSection(uintptr_t Size);
+
public:
RecordingMemoryManager() {}
virtual ~RecordingMemoryManager();