LLVM  16.0.0git
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::orc::SharedMemoryMapper Class Referencefinal

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

Inheritance diagram for llvm::orc::SharedMemoryMapper:
Inheritance graph
Collaboration diagram for llvm::orc::SharedMemoryMapper:
Collaboration graph


struct  SymbolAddrs

Public Member Functions

 SharedMemoryMapper (ExecutorProcessControl &EPC, SymbolAddrs SAs, size_t PageSize)
unsigned int getPageSize () override
void reserve (size_t NumBytes, OnReservedFunction OnReserved) override
 Reserves address space in executor process. More...
char * prepare (ExecutorAddr Addr, size_t ContentSize) override
 Provides working memory. More...
void initialize (AllocInfo &AI, OnInitializedFunction OnInitialized) override
 Ensures executor memory is synchronized with working copy memory, sends functions to be called after initilization and before deinitialization and applies memory protections Returns a unique address identifying the allocation. More...
void deinitialize (ArrayRef< ExecutorAddr > Allocations, OnDeinitializedFunction OnDeInitialized) override
 Runs previously specified deinitialization actions Executor addresses returned by initialize should be passed. More...
void release (ArrayRef< ExecutorAddr > Reservations, OnReleasedFunction OnRelease) override
 Release address space acquired through reserve() More...
 ~SharedMemoryMapper () override
- Public Member Functions inherited from llvm::orc::MemoryMapper
virtual ~MemoryMapper ()

Static Public Member Functions

static Expected< std::unique_ptr< SharedMemoryMapper > > Create (ExecutorProcessControl &EPC, SymbolAddrs SAs)

Additional Inherited Members

- Public Types inherited from llvm::orc::MemoryMapper
using OnReservedFunction = unique_function< void(Expected< ExecutorAddrRange >)>
using OnInitializedFunction = unique_function< void(Expected< ExecutorAddr >)>
using OnDeinitializedFunction = unique_function< void(Error)>
using OnReleasedFunction = unique_function< void(Error)>

Detailed Description

Definition at line 123 of file MemoryMapper.h.

Constructor & Destructor Documentation

◆ SharedMemoryMapper()

llvm::orc::SharedMemoryMapper::SharedMemoryMapper ( ExecutorProcessControl EPC,
SymbolAddrs  SAs,
size_t  PageSize 

Definition at line 191 of file MemoryMapper.cpp.

References llvm_unreachable.

◆ ~SharedMemoryMapper()

llvm::orc::SharedMemoryMapper::~SharedMemoryMapper ( )

Definition at line 413 of file MemoryMapper.cpp.

Member Function Documentation

◆ Create()

Expected< std::unique_ptr< SharedMemoryMapper > > llvm::orc::SharedMemoryMapper::Create ( ExecutorProcessControl EPC,
SymbolAddrs  SAs 

◆ deinitialize()

void llvm::orc::SharedMemoryMapper::deinitialize ( ArrayRef< ExecutorAddr Allocations,
OnDeinitializedFunction  OnDeInitialized 

Runs previously specified deinitialization actions Executor addresses returned by initialize should be passed.

Implements llvm::orc::MemoryMapper.

Definition at line 346 of file MemoryMapper.cpp.

References llvm::orc::ExecutorProcessControl::callSPSWrapperAsync(), llvm::cantFail(), llvm::orc::SharedMemoryMapper::SymbolAddrs::Deinitialize, llvm::orc::SharedMemoryMapper::SymbolAddrs::Instance, and move.

◆ getPageSize()

unsigned int llvm::orc::SharedMemoryMapper::getPageSize ( )

Implements llvm::orc::MemoryMapper.

Definition at line 139 of file MemoryMapper.h.

◆ initialize()

void llvm::orc::SharedMemoryMapper::initialize ( AllocInfo AI,
OnInitializedFunction  OnInitialized 

◆ prepare()

char * llvm::orc::SharedMemoryMapper::prepare ( ExecutorAddr  Addr,
size_t  ContentSize 

Provides working memory.

Implements llvm::orc::MemoryMapper.

Definition at line 293 of file MemoryMapper.cpp.

References Addr, and assert().

◆ release()

void llvm::orc::SharedMemoryMapper::release ( ArrayRef< ExecutorAddr Reservations,
OnReleasedFunction  OnRelease 

Release address space acquired through reserve()

Implements llvm::orc::MemoryMapper.

Definition at line 364 of file MemoryMapper.cpp.

◆ reserve()

void llvm::orc::SharedMemoryMapper::reserve ( size_t  NumBytes,
OnReservedFunction  OnReserved 

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