LLVM 20.0.0git
|
Represents an allocation which has not been finalized yet. More...
#include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"
Public Types | |
using | OnFinalizedFunction = unique_function< void(Expected< FinalizedAlloc >)> |
using | OnAbandonedFunction = unique_function< void(Error)> |
Public Member Functions | |
virtual | ~InFlightAlloc () |
virtual void | abandon (OnAbandonedFunction OnAbandoned)=0 |
Called prior to finalization if the allocation should be abandoned. | |
virtual void | finalize (OnFinalizedFunction OnFinalized)=0 |
Called to transfer working memory to the target and apply finalization. | |
Expected< FinalizedAlloc > | finalize () |
Synchronous convenience version of finalize. | |
Represents an allocation which has not been finalized yet.
InFlightAllocs manage both executor memory allocations and working memory allocations.
On finalization, the InFlightAlloc should transfer the content of working memory into executor memory, apply memory protections, and run any finalization functions.
Working memory should be kept alive at least until one of the following happens: (1) the InFlightAlloc instance is destroyed, (2) the InFlightAlloc is abandoned, (3) finalized target memory is destroyed.
If abandon is called then working memory and executor memory should both be freed.
Definition at line 118 of file JITLinkMemoryManager.h.
using llvm::jitlink::JITLinkMemoryManager::InFlightAlloc::OnAbandonedFunction = unique_function<void(Error)> |
Definition at line 121 of file JITLinkMemoryManager.h.
using llvm::jitlink::JITLinkMemoryManager::InFlightAlloc::OnFinalizedFunction = unique_function<void(Expected<FinalizedAlloc>)> |
Definition at line 120 of file JITLinkMemoryManager.h.
|
virtualdefault |
|
pure virtual |
Called prior to finalization if the allocation should be abandoned.
Implemented in llvm::jitlink::InProcessMemoryManager::IPInFlightAlloc, llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc, and llvm::orc::MapperJITLinkMemoryManager::InFlightAlloc.
|
inline |
Synchronous convenience version of finalize.
Definition at line 132 of file JITLinkMemoryManager.h.
References finalize().
Referenced by finalize().
|
pure virtual |
Called to transfer working memory to the target and apply finalization.
Implemented in llvm::orc::EPCGenericJITLinkMemoryManager::InFlightAlloc, llvm::orc::MapperJITLinkMemoryManager::InFlightAlloc, and llvm::jitlink::InProcessMemoryManager::IPInFlightAlloc.