LLVM  13.0.0git
Public Types | Public Member Functions | List of all members
llvm::jitlink::JITLinkMemoryManager::Allocation Class Referenceabstract

Represents an allocation created by the memory manager. More...

#include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"

Inheritance diagram for llvm::jitlink::JITLinkMemoryManager::Allocation:
Inheritance graph
[legend]

Public Types

using FinalizeContinuation = std::function< void(Error)>
 

Public Member Functions

virtual ~Allocation ()
 
virtual MutableArrayRef< char > getWorkingMemory (ProtectionFlags Seg)=0
 Should return the address of linker working memory for the segment with the given protection flags. More...
 
virtual JITTargetAddress getTargetMemory (ProtectionFlags Seg)=0
 Should return the final address in the target process where the segment will reside. More...
 
virtual void finalizeAsync (FinalizeContinuation OnFinalize)=0
 Should transfer from working memory to target memory, and release working memory. More...
 
Error finalize ()
 Calls finalizeAsync and waits for completion. More...
 
virtual Error deallocate ()=0
 Should deallocate target memory. More...
 

Detailed Description

Represents an allocation created by the memory manager.

An allocation object is responsible for allocating and owning jit-linker working and target memory, and for transfering from working to target memory.

Definition at line 63 of file JITLinkMemoryManager.h.

Member Typedef Documentation

◆ FinalizeContinuation

Definition at line 65 of file JITLinkMemoryManager.h.

Constructor & Destructor Documentation

◆ ~Allocation()

llvm::jitlink::JITLinkMemoryManager::Allocation::~Allocation ( )
virtualdefault

Member Function Documentation

◆ deallocate()

virtual Error llvm::jitlink::JITLinkMemoryManager::Allocation::deallocate ( )
pure virtual

Should deallocate target memory.

Implemented in llvm::orc::remote::OrcRemoteTargetClient::RPCMMAlloc.

◆ finalize()

Error llvm::jitlink::JITLinkMemoryManager::Allocation::finalize ( )
inline

Calls finalizeAsync and waits for completion.

Definition at line 82 of file JITLinkMemoryManager.h.

References finalizeAsync().

◆ finalizeAsync()

virtual void llvm::jitlink::JITLinkMemoryManager::Allocation::finalizeAsync ( FinalizeContinuation  OnFinalize)
pure virtual

Should transfer from working memory to target memory, and release working memory.

Implemented in llvm::orc::remote::OrcRemoteTargetClient::RPCMMAlloc.

Referenced by finalize().

◆ getTargetMemory()

virtual JITTargetAddress llvm::jitlink::JITLinkMemoryManager::Allocation::getTargetMemory ( ProtectionFlags  Seg)
pure virtual

Should return the final address in the target process where the segment will reside.

Implemented in llvm::orc::remote::OrcRemoteTargetClient::RPCMMAlloc.

◆ getWorkingMemory()

virtual MutableArrayRef<char> llvm::jitlink::JITLinkMemoryManager::Allocation::getWorkingMemory ( ProtectionFlags  Seg)
pure virtual

Should return the address of linker working memory for the segment with the given protection flags.

Implemented in llvm::orc::remote::OrcRemoteTargetClient::RPCMMAlloc.


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