support near allocations for the JIT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22554 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Lenharth
2005-07-29 23:40:16 +00:00
parent 422f3d58a8
commit a00269bc3e
4 changed files with 87 additions and 37 deletions
+3 -1
View File
@@ -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