LLVM: llvm::orc::InProcessMemoryMapper Class Reference (original) (raw)

#include "[llvm/ExecutionEngine/Orc/MemoryMapper.h](MemoryMapper%5F8h%5Fsource.html)"

Public Member Functions
InProcessMemoryMapper (size_t PageSize)
unsigned int getPageSize () override
void reserve (size_t NumBytes, OnReservedFunction OnReserved) override
Reserves address space in executor process.
void initialize (AllocInfo &AI, OnInitializedFunction OnInitialized) override
Ensures executor memory is synchronized with working copy memory, sends functions to be called after initilization and before deinitialization and applies memory protections Returns a unique address identifying the allocation.
char * prepare (jitlink::LinkGraph &G, ExecutorAddr Addr, size_t ContentSize) override
Provides working memory The LinkGraph parameter is included to allow implementations to allocate working memory from the LinkGraph's allocator, in which case it will be deallocated when the LinkGraph is destroyed.
void deinitialize (ArrayRef< ExecutorAddr > Allocations, OnDeinitializedFunction OnDeInitialized) override
Runs previously specified deinitialization actions Executor addresses returned by initialize should be passed.
void release (ArrayRef< ExecutorAddr > Reservations, OnReleasedFunction OnRelease) override
Release address space acquired through reserve()
~InProcessMemoryMapper () override
Public Member Functions inherited from llvm::orc::MemoryMapper
virtual ~MemoryMapper ()
Additional Inherited Members
Public Types inherited from llvm::orc::MemoryMapper
using OnReservedFunction = unique_function<void(Expected<ExecutorAddrRange>)>
using OnInitializedFunction = unique_function<void(Expected<ExecutorAddr>)>
using OnDeinitializedFunction = unique_function<void(Error)>
using OnReleasedFunction = unique_function<void(Error)>

Definition at line 87 of file MemoryMapper.h.

llvm::orc::InProcessMemoryMapper::InProcessMemoryMapper ( size_t PageSize )

~InProcessMemoryMapper()

llvm::orc::InProcessMemoryMapper::~InProcessMemoryMapper ( ) override

Create()

deinitialize()

getPageSize()

unsigned int llvm::orc::InProcessMemoryMapper::getPageSize ( ) inlineoverridevirtual

initialize()

Ensures executor memory is synchronized with working copy memory, sends functions to be called after initilization and before deinitialization and applies memory protections Returns a unique address identifying the allocation.

This address should be passed to deinitialize to run deallocation actions (and reset permissions where possible).

Implements llvm::orc::MemoryMapper.

Definition at line 66 of file MemoryMapper.cpp.

References llvm::orc::MemoryMapper::AllocInfo::Actions, llvm::Alloc, llvm::sampleprof::Base, llvm::errorCodeToError(), llvm::orc::Exec, llvm::sys::Memory::InvalidateInstructionCache(), llvm::orc::MemoryMapper::AllocInfo::MappingBase, llvm::sys::Memory::protectMappedMemory(), llvm::orc::shared::runFinalizeActions(), llvm::orc::MemoryMapper::AllocInfo::Segments, Size, llvm::orc::ExecutorAddr::toPtr(), and llvm::orc::toSysMemoryProtectionFlags().

prepare()

release()

reserve()

void llvm::orc::InProcessMemoryMapper::reserve ( size_t NumBytes, OnReservedFunction OnReserved ) overridevirtual

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