const MemoryBlock *NearBlock,
std::string *ErrMsg = 0);
+ /// This method allocates a block of Read/Write memory. This memory
+ /// needs to have executable permissions set before it can be used
+ /// to execute JIT'ed code.
+ ///
+ /// On success, this returns a non-null memory block, otherwise it returns
+ /// a null memory block and fills in *ErrMsg.
+ ///
+ /// @brief Allocate Read/Write/Execute memory.
static MemoryBlock AllocateRW(unsigned NumBytes,
const MemoryBlock *NearBlock,
std::string *ErrMsg = 0);
flags, fd, 0);
if (pa == MAP_FAILED) {
if (NearBlock) //Try again without a near hint
- return AllocateRWX(NumBytes, 0);
+ return AllocateRW(NumBytes, 0);
MakeErrMsg(ErrMsg, "Can't allocate RWX Memory");
return MemoryBlock();