LLVM 20.0.0git
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::orc::MapperJITLinkMemoryManager Class Reference

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

Inheritance diagram for llvm::orc::MapperJITLinkMemoryManager:
Inheritance graph
[legend]

Classes

class  InFlightAlloc
 

Public Member Functions

 MapperJITLinkMemoryManager (size_t ReservationGranularity, std::unique_ptr< MemoryMapper > Mapper)
 
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.
 

Static Public Member Functions

template<class MemoryMapperType , class... Args>
static Expected< std::unique_ptr< MapperJITLinkMemoryManager > > CreateWithMapper (size_t ReservationGranularity, Args &&...A)
 

Additional Inherited Members

Detailed Description

Definition at line 23 of file MapperJITLinkMemoryManager.h.

Constructor & Destructor Documentation

◆ MapperJITLinkMemoryManager()

llvm::orc::MapperJITLinkMemoryManager::MapperJITLinkMemoryManager ( size_t  ReservationGranularity,
std::unique_ptr< MemoryMapper Mapper 
)

Definition at line 56 of file MapperJITLinkMemoryManager.cpp.

Member Function Documentation

◆ allocate()

void llvm::orc::MapperJITLinkMemoryManager::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 61 of file MapperJITLinkMemoryManager.cpp.

References llvm::alignTo(), End, G, llvm::sys::SmartMutex< mt_only >::lock(), llvm::orc::Result, and llvm::sys::SmartMutex< mt_only >::unlock().

◆ CreateWithMapper()

template<class MemoryMapperType , class... Args>
static Expected< std::unique_ptr< MapperJITLinkMemoryManager > > llvm::orc::MapperJITLinkMemoryManager::CreateWithMapper ( size_t  ReservationGranularity,
Args &&...  A 
)
inlinestatic

Definition at line 30 of file MapperJITLinkMemoryManager.h.

References A.

◆ deallocate()

void llvm::orc::MapperJITLinkMemoryManager::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 146 of file MapperJITLinkMemoryManager.cpp.

References Addr, Size, and llvm::Error::success().


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