|
LLVM 24.0.0git
|
Manages remote memory by driving an executor-side memory manager. More...
#include "llvm/ExecutionEngine/Orc/SimpleRemoteMemoryMapper.h"
Public Member Functions | |
| SimpleRemoteMemoryMapper (ExecutionSession &ES, SimpleMemoryMapBindings B) | |
| Create a SimpleRemoteMemoryMapper from a given set of memory-manager bindings. | |
| unsigned int | getPageSize () override |
| void | reserve (size_t NumBytes, OnReservedFunction OnReserved) override |
| Reserves memory in the executor, returning the base address of the reserved range on success. | |
| 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 | initialize (AllocInfo &AI, OnInitializedFunction OnInitialized) override |
| Initializes memory within a previously reserved region, applying protections and running any finalization actions. | |
| void | deinitialize (ArrayRef< ExecutorAddr > Allocations, OnDeinitializedFunction OnDeInitialized) override |
| Given a series of keys from previous initialize calls, deinitialize previously initialized memory regions: run their dealloc actions, reset permissions, and decommit if possible. | |
| void | release (ArrayRef< ExecutorAddr > Reservations, OnReleasedFunction OnRelease) override |
| Given a sequence of base addresses from previous reserve calls, release the underlying ranges, deinitializing any remaining regions within them. | |
| Public Member Functions inherited from llvm::orc::MemoryMapper | |
| virtual | ~MemoryMapper () |
Static Public Member Functions | |
| static Expected< std::unique_ptr< SimpleRemoteMemoryMapper > > | Create (ExecutionSession &ES, SimpleMemoryMapBindings B) |
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)> |
Manages remote memory by driving an executor-side memory manager.
Definition at line 26 of file SimpleRemoteMemoryMapper.h.
| llvm::orc::SimpleRemoteMemoryMapper::SimpleRemoteMemoryMapper | ( | ExecutionSession & | ES, |
| SimpleMemoryMapBindings | B ) |
Create a SimpleRemoteMemoryMapper from a given set of memory-manager bindings.
Definition at line 15 of file SimpleRemoteMemoryMapper.cpp.
References llvm::move().
|
inlinestatic |
Definition at line 33 of file SimpleRemoteMemoryMapper.h.
|
overridevirtual |
Given a series of keys from previous initialize calls, deinitialize previously initialized memory regions: run their dealloc actions, reset permissions, and decommit if possible.
Implements llvm::orc::MemoryMapper.
Definition at line 52 of file SimpleRemoteMemoryMapper.cpp.
|
inlineoverridevirtual |
Implements llvm::orc::MemoryMapper.
Definition at line 37 of file SimpleRemoteMemoryMapper.h.
|
overridevirtual |
Initializes memory within a previously reserved region, applying protections and running any finalization actions.
On success, returns a key that can be used to deinitialize the region.
Implements llvm::orc::MemoryMapper.
Definition at line 36 of file SimpleRemoteMemoryMapper.cpp.
References llvm::orc::MemoryMapper::AllocInfo::Actions, llvm::orc::tpctypes::FinalizeRequest::Actions, llvm::orc::MemoryMapper::AllocInfo::MappingBase, llvm::orc::MemoryMapper::AllocInfo::Segments, llvm::orc::tpctypes::FinalizeRequest::Segments, and std::swap().
|
overridevirtual |
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.
Implements llvm::orc::MemoryMapper.
Definition at line 31 of file SimpleRemoteMemoryMapper.cpp.
References G.
|
overridevirtual |
Given a sequence of base addresses from previous reserve calls, release the underlying ranges, deinitializing any remaining regions within them.
Implements llvm::orc::MemoryMapper.
Definition at line 58 of file SimpleRemoteMemoryMapper.cpp.
|
overridevirtual |
Reserves memory in the executor, returning the base address of the reserved range on success.
Implements llvm::orc::MemoryMapper.
Definition at line 19 of file SimpleRemoteMemoryMapper.cpp.
References llvm::orc::Result, and uint64_t.