LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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)
 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

MemoryBlock llvm::Memory::AllocateRWX unsigned  NumBytes  )  [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.

Exceptions:
std::string if an error occurred.

Definition at line 29 of file AIX/Memory.cpp.

References llvm::sys::MemoryBlock::Address, llvm::GetPageSize(), and llvm::sys::MemoryBlock::Size.

void llvm::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.

Definition at line 46 of file AIX/Memory.cpp.

References llvm::sys::MemoryBlock::Address, and llvm::sys::MemoryBlock::Size.


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