LLVM 24.0.0git
llvm::orc::EPCGenericJITLinkMemoryManager Class Reference

#include "llvm/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManager.h"

Inheritance diagram for llvm::orc::EPCGenericJITLinkMemoryManager:
[legend]

Classes

struct  Bindings
 The resolved controller-side handle to an executor-side memory manager: the address of the allocator instance (passed as the first argument to each call) plus the proxies for its functions. More...
class  InFlightAlloc

Public Types

using ReserveProxy = Proxy<Expected<ExecutorAddr>(ExecutorAddr, uint64_t)>
 Reserve an address range of the given size; returns its base.
using InitializeProxy
 Apply a finalize request; returns a key for the initialized allocation.
using DeinitializeProxy = Proxy<Error(ExecutorAddr, ArrayRef<ExecutorAddr>)>
 Deinitialize the allocations with the given base addresses (running their deallocation actions) without releasing their memory.
using ReleaseProxy = Proxy<Error(ExecutorAddr, ArrayRef<ExecutorAddr>)>
 Release the allocations with the given base addresses.

Public Member Functions

 EPCGenericJITLinkMemoryManager (ExecutionSession &ES, Bindings B)
 Create an EPCGenericJITLinkMemoryManager instance from a given set of memory-manager bindings.
void allocate (const jitlink::JITLinkDylib *JD, jitlink::LinkGraph &G, OnAllocatedFunction OnAllocated) override
 Start the allocation process.
void deallocate (std::vector< FinalizedAlloc > Allocs, OnDeallocatedFunction OnDeallocated) override
 Deallocate a list of allocation objects.

Detailed Description

Definition at line 35 of file EPCGenericJITLinkMemoryManager.h.

Member Typedef Documentation

◆ DeinitializeProxy

Deinitialize the allocations with the given base addresses (running their deallocation actions) without releasing their memory.

Definition at line 47 of file EPCGenericJITLinkMemoryManager.h.

◆ InitializeProxy

Initial value:

Apply a finalize request; returns a key for the initialized allocation.

Definition at line 42 of file EPCGenericJITLinkMemoryManager.h.

◆ ReleaseProxy

Release the allocations with the given base addresses.

Definition at line 50 of file EPCGenericJITLinkMemoryManager.h.

◆ ReserveProxy

Reserve an address range of the given size; returns its base.

Definition at line 39 of file EPCGenericJITLinkMemoryManager.h.

Constructor & Destructor Documentation

◆ EPCGenericJITLinkMemoryManager()

llvm::orc::EPCGenericJITLinkMemoryManager::EPCGenericJITLinkMemoryManager ( ExecutionSession & ES,
Bindings B )
inline

Create an EPCGenericJITLinkMemoryManager instance from a given set of memory-manager bindings.

Definition at line 72 of file EPCGenericJITLinkMemoryManager.h.

References llvm::move().

Referenced by llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc::InFlightAlloc().

Member Function Documentation

◆ allocate()

void llvm::orc::EPCGenericJITLinkMemoryManager::allocate ( const jitlink::JITLinkDylib * JD,
jitlink::LinkGraph & G,
OnAllocatedFunction OnAllocated )
overridevirtual

Start the allocation process.

If the initial allocation is successful then the OnAllocated function will be called with a std::unique_ptr<InFlightAlloc> value. If the assocation is unsuccessful then the OnAllocated function will be called with an Error.

Implements llvm::jitlink::JITLinkMemoryManager.

Definition at line 82 of file EPCGenericJITLinkMemoryManager.cpp.

References G, llvm::jitlink::BasicLayout::getContiguousPageBasedLayoutSizes(), and llvm::Expected< T >::takeError().

◆ deallocate()

void llvm::orc::EPCGenericJITLinkMemoryManager::deallocate ( std::vector< FinalizedAlloc > Allocs,
OnDeallocatedFunction OnDeallocated )
overridevirtual

Deallocate a list of allocation objects.

Dealloc actions will be run in reverse order (from the end of the vector to the start).

Implements llvm::jitlink::JITLinkMemoryManager.

Definition at line 102 of file EPCGenericJITLinkMemoryManager.cpp.

References A().


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