aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/System/Memory.h
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-07-29 23:40:16 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-07-29 23:40:16 +0000
commita00269bc3e97d4e53ed196325ef02e6d1f3d70dc (patch)
tree8ac8e30fc2eaea6abd4adb0eafbe4a47baf68dbe /include/llvm/System/Memory.h
parent422f3d58a8a9d346e0bb34f77c30184b0dfc2838 (diff)
support near allocations for the JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System/Memory.h')
-rw-r--r--include/llvm/System/Memory.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/System/Memory.h b/include/llvm/System/Memory.h
index 305ec68cbb..3a9d89f803 100644
--- a/include/llvm/System/Memory.h
+++ b/include/llvm/System/Memory.h
@@ -43,9 +43,11 @@ namespace sys {
/// This method allocates a block of Read/Write/Execute memory that is
/// suitable for executing dynamically generated code (e.g. JIT). An
/// attempt to allocate \p NumBytes bytes of virtual memory is made.
+ /// \p NearBlock may point to an existing allocation in which case
+ /// an attempt is made to allocate more memory near the existing block.
/// @throws std::string if an error occurred.
/// @brief Allocate Read/Write/Execute memory.
- static MemoryBlock AllocateRWX(unsigned NumBytes);
+ static MemoryBlock AllocateRWX(unsigned NumBytes, const MemoryBlock* NearBlock);
/// This method releases a block of Read/Write/Execute memory that was
/// allocated with the AllocateRWX method. It should not be used to