LLVM API Documentation

llvm::sys::Memory Class Reference

An abstraction for memory operations. More...

#include <Memory.h>

List of all members.

Static Public Member Functions

Functions
static MemoryBlock AllocateRWX (unsigned NumBytes, const MemoryBlock *NearBlock)
 Allocate Read/Write/Execute memory.
static void ReleaseRWX (MemoryBlock &block)
 Release Read/Write/Execute memory.


Detailed Description

An abstraction for memory operations.

This class provides various memory handling functions that manipulate MemoryBlock instances.

Since:
1.4

Definition at line 39 of file Memory.h.


Member Function Documentation

static MemoryBlock llvm::sys::Memory::AllocateRWX ( unsigned  NumBytes,
const MemoryBlock NearBlock 
) [static]

Allocate Read/Write/Execute memory.

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 NumBytes bytes of virtual memory is made. NearBlock may point to an existing allocation in which case an attempt is made to allocate more memory near the existing block.

Exceptions:
std::string if an error occurred.

static void llvm::sys::Memory::ReleaseRWX ( MemoryBlock block  )  [static]

Release Read/Write/Execute memory.

This method releases a block of Read/Write/Execute memory that was allocated with the AllocateRWX method. It should not be used to release any memory block allocated any other way.

Exceptions:
std::string if an error occurred.


The documentation for this class was generated from the following file: