LLVM: llvm::orc::EPCGenericRTDyldMemoryManager Class Reference (original) (raw)
Remote-mapped RuntimeDyld-compatible memory manager. More...
#include "[llvm/ExecutionEngine/Orc/EPCGenericRTDyldMemoryManager.h](EPCGenericRTDyldMemoryManager%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| EPCGenericRTDyldMemoryManager (ExecutorProcessControl &EPC, SymbolAddrs SAs) | |
| Create an EPCGenericRTDyldMemoryManager using the given EPC and symbol addrs. | |
| EPCGenericRTDyldMemoryManager (const EPCGenericRTDyldMemoryManager &)=delete | |
| EPCGenericRTDyldMemoryManager & | operator= (const EPCGenericRTDyldMemoryManager &)=delete |
| EPCGenericRTDyldMemoryManager (EPCGenericRTDyldMemoryManager &&)=delete | |
| EPCGenericRTDyldMemoryManager & | operator= (EPCGenericRTDyldMemoryManager &&)=delete |
| ~EPCGenericRTDyldMemoryManager () override | |
| uint8_t * | allocateCodeSection (uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName) override |
| Allocate a memory block of (at least) the given size suitable for executable code. | |
| uint8_t * | allocateDataSection (uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName, bool IsReadOnly) override |
| Allocate a memory block of (at least) the given size suitable for data. | |
| void | reserveAllocationSpace (uintptr_t CodeSize, Align CodeAlign, uintptr_t RODataSize, Align RODataAlign, uintptr_t RWDataSize, Align RWDataAlign) override |
| Inform the memory manager about the total amount of memory required to allocate all sections to be loaded: CodeSize - the total size of all code sections DataSizeRO - the total size of all read-only data sections DataSizeRW - the total size of all read-write data sections. | |
| bool | needsToReserveAllocationSpace () override |
| Override to return true to enable the reserveAllocationSpace callback. | |
| void | registerEHFrames (uint8_t *Addr, uint64_t LoadAddr, size_t Size) override |
| Register the EH frames with the runtime so that c++ exceptions work. | |
| void | deregisterEHFrames () override |
| void | notifyObjectLoaded (RuntimeDyld &Dyld, const object::ObjectFile &Obj) override |
| This method is called after an object has been loaded into memory but before relocations are applied to the loaded sections. | |
| bool | finalizeMemory (std::string *ErrMsg=nullptr) override |
| This method is called when object loading is complete and section page permissions can be applied. | |
| Public Member Functions inherited from llvm::RuntimeDyld::MemoryManager | |
| MemoryManager ()=default | |
| virtual | ~MemoryManager ()=default |
| virtual TLSSection | allocateTLSSection (uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName) |
| Allocate a memory block of (at least) the given size to be used for thread-local storage (TLS). | |
| virtual bool | allowStubAllocation () const |
| Override to return false to tell LLVM no stub space will be needed. |
Remote-mapped RuntimeDyld-compatible memory manager.
Definition at line 27 of file EPCGenericRTDyldMemoryManager.h.
◆ EPCGenericRTDyldMemoryManager() [2/3]
◆ EPCGenericRTDyldMemoryManager() [3/3]
◆ ~EPCGenericRTDyldMemoryManager()
| llvm::orc::EPCGenericRTDyldMemoryManager::~EPCGenericRTDyldMemoryManager ( ) | override |
|---|
◆ allocateCodeSection()
| uint8_t * llvm::orc::EPCGenericRTDyldMemoryManager::allocateCodeSection ( uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName ) | overridevirtual |
|---|
◆ allocateDataSection()
| uint8_t * llvm::orc::EPCGenericRTDyldMemoryManager::allocateDataSection ( uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName, bool IsReadOnly ) | overridevirtual |
|---|
◆ CreateWithDefaultBootstrapSymbols()
◆ deregisterEHFrames()
| void llvm::orc::EPCGenericRTDyldMemoryManager::deregisterEHFrames ( ) | overridevirtual |
|---|
◆ finalizeMemory()
| bool llvm::orc::EPCGenericRTDyldMemoryManager::finalizeMemory ( std::string * ErrMsg = nullptr) | overridevirtual |
|---|
This method is called when object loading is complete and section page permissions can be applied.
It is up to the memory manager implementation to decide whether or not to act on this method. The memory manager will typically allocate all sections as read-write and then apply specific permissions when this method is called. Code sections cannot be executed until this function has been called. In addition, any cache coherency operations needed to reliably use the memory are also performed.
Returns true if an error occurred, false otherwise.
Implements llvm::RuntimeDyld::MemoryManager.
Definition at line 204 of file EPCGenericRTDyldMemoryManager.cpp.
References llvm::orc::tpctypes::FinalizeRequest::Actions, llvm::alignAddr(), llvm::alignTo(), llvm::cantFail(), llvm::orc::shared::WrapperFunctionCall::Create(), llvm::dbgs(), llvm::orc::Exec, I, LLVM_DEBUG, llvm::orc::Read, llvm::orc::tpctypes::FinalizeRequest::Segments, llvm::orc::ExecutorAddrRange::Start, std::swap(), llvm::Expected< T >::takeError(), llvm::toString(), and llvm::orc::Write.
Referenced by operator=().
◆ needsToReserveAllocationSpace()
| bool llvm::orc::EPCGenericRTDyldMemoryManager::needsToReserveAllocationSpace ( ) | overridevirtual |
|---|
◆ notifyObjectLoaded()
◆ operator=() [1/2]
◆ operator=() [2/2]
References allocateCodeSection(), allocateDataSection(), CodeSize, deregisterEHFrames(), EPCGenericRTDyldMemoryManager(), finalizeMemory(), needsToReserveAllocationSpace(), notifyObjectLoaded(), registerEHFrames(), reserveAllocationSpace(), llvm::RuntimeDyld::MemoryManager::RuntimeDyld, and Size.
◆ registerEHFrames()
| void llvm::orc::EPCGenericRTDyldMemoryManager::registerEHFrames ( uint8_t * Addr, uint64_t LoadAddr, size_t Size ) | overridevirtual |
|---|
◆ reserveAllocationSpace()
| void llvm::orc::EPCGenericRTDyldMemoryManager::reserveAllocationSpace ( uintptr_t CodeSize, Align CodeAlign, uintptr_t RODataSize, Align RODataAlign, uintptr_t RWDataSize, Align RWDataAlign ) | overridevirtual |
|---|
The documentation for this class was generated from the following files:
- include/llvm/ExecutionEngine/Orc/EPCGenericRTDyldMemoryManager.h
- lib/ExecutionEngine/Orc/EPCGenericRTDyldMemoryManager.cpp