22 [NumBytes, OnReserved = std::move(OnReserved)](
25 return OnReserved(
Result.takeError());
28 ES, B.Instance,
static_cast<uint64_t>(NumBytes));
33 return G.allocateBuffer(ContentSize).data();
46 Seg.ContentSize + Seg.ZeroFillSize,
49 B.Initialize(std::move(OnInitialized), ES, B.Instance, std::move(FR));
55 B.Deinitialize(std::move(OnDeinitialized), ES, B.Instance, Allocations);
60 B.Release(std::move(OnReleased), ES, B.Instance, Bases);
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Tagged union holding either a T or a Error.
An ExecutionSession represents a running JIT program.
Represents an address in the executor process.
unique_function< void(Error)> OnReleasedFunction
unique_function< void(Expected< ExecutorAddr >)> OnInitializedFunction
unique_function< void(Expected< ExecutorAddrRange >)> OnReservedFunction
unique_function< void(Error)> OnDeinitializedFunction
void initialize(AllocInfo &AI, OnInitializedFunction OnInitialized) override
Initializes memory within a previously reserved region, applying protections and running any finaliza...
char * prepare(jitlink::LinkGraph &G, ExecutorAddr Addr, size_t ContentSize) override
Provides working memory The LinkGraph parameter is included to allow implementations to allocate work...
SimpleRemoteMemoryMapper(ExecutionSession &ES, SimpleMemoryMapBindings B)
Create a SimpleRemoteMemoryMapper from a given set of memory-manager bindings.
void deinitialize(ArrayRef< ExecutorAddr > Allocations, OnDeinitializedFunction OnDeInitialized) override
Given a series of keys from previous initialize calls, deinitialize previously initialized memory reg...
void release(ArrayRef< ExecutorAddr > Reservations, OnReleasedFunction OnRelease) override
Given a sequence of base addresses from previous reserve calls, release the underlying ranges,...
void reserve(size_t NumBytes, OnReservedFunction OnReserved) override
Reserves memory in the executor, returning the base address of the reserved range on success.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
Represents an address range in the exceutor process.
Represents a single allocation containing multiple segments and initialization and deinitialization a...
std::vector< SegInfo > Segments
shared::AllocActions Actions
The resolved controller-side handle to an executor-side memory manager: the address of the manager in...
std::vector< SegFinalizeRequest > Segments
shared::AllocActions Actions