LLVM 20.0.0git
|
Manages mapping, content transfer and protections for JIT memory. More...
#include "llvm/ExecutionEngine/Orc/MemoryMapper.h"
Classes | |
struct | AllocInfo |
Represents a single allocation containing multiple segments and initialization and deinitialization actions. More... | |
Public Types | |
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)> |
Public Member Functions | |
virtual unsigned int | getPageSize ()=0 |
virtual void | reserve (size_t NumBytes, OnReservedFunction OnReserved)=0 |
Reserves address space in executor process. | |
virtual char * | prepare (ExecutorAddr Addr, size_t ContentSize)=0 |
Provides working memory. | |
virtual void | initialize (AllocInfo &AI, OnInitializedFunction OnInitialized)=0 |
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. | |
virtual void | deinitialize (ArrayRef< ExecutorAddr > Allocations, OnDeinitializedFunction OnDeInitialized)=0 |
Runs previously specified deinitialization actions Executor addresses returned by initialize should be passed. | |
virtual void | release (ArrayRef< ExecutorAddr > Reservations, OnReleasedFunction OnRelease)=0 |
Release address space acquired through reserve() | |
virtual | ~MemoryMapper () |
Manages mapping, content transfer and protections for JIT memory.
Definition at line 26 of file MemoryMapper.h.
using llvm::orc::MemoryMapper::OnDeinitializedFunction = unique_function<void(Error)> |
Definition at line 66 of file MemoryMapper.h.
using llvm::orc::MemoryMapper::OnInitializedFunction = unique_function<void(Expected<ExecutorAddr>)> |
Definition at line 55 of file MemoryMapper.h.
using llvm::orc::MemoryMapper::OnReleasedFunction = unique_function<void(Error)> |
Definition at line 73 of file MemoryMapper.h.
using llvm::orc::MemoryMapper::OnReservedFunction = unique_function<void(Expected<ExecutorAddrRange>)> |
Definition at line 44 of file MemoryMapper.h.
|
virtual |
Definition at line 31 of file MemoryMapper.cpp.
|
pure virtual |
Runs previously specified deinitialization actions Executor addresses returned by initialize should be passed.
Implemented in llvm::orc::InProcessMemoryMapper, and llvm::orc::SharedMemoryMapper.
|
pure virtual |
Implemented in llvm::orc::InProcessMemoryMapper, and llvm::orc::SharedMemoryMapper.
|
pure virtual |
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).
Implemented in llvm::orc::InProcessMemoryMapper, and llvm::orc::SharedMemoryMapper.
|
pure virtual |
Provides working memory.
Implemented in llvm::orc::InProcessMemoryMapper, and llvm::orc::SharedMemoryMapper.
|
pure virtual |
Release address space acquired through reserve()
Implemented in llvm::orc::InProcessMemoryMapper, and llvm::orc::SharedMemoryMapper.
|
pure virtual |
Reserves address space in executor process.
Implemented in llvm::orc::InProcessMemoryMapper, and llvm::orc::SharedMemoryMapper.