LLVM 22.0.0git
llvm::orc::MapperJITLinkMemoryManager Class Reference

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

Inheritance diagram for llvm::orc::MapperJITLinkMemoryManager:
[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 24 of file MapperJITLinkMemoryManager.h.

Constructor & Destructor Documentation

◆ MapperJITLinkMemoryManager()

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

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(), llvm::jitlink::BasicLayout::apply(), llvm::orc::ExecutorAddrRange::empty(), G, llvm::jitlink::BasicLayout::getContiguousPageBasedLayoutSizes(), llvm::orc::Result, and llvm::jitlink::BasicLayout::segments().

◆ CreateWithMapper()

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

Definition at line 32 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 Size, and llvm::Error::success().


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