LLVM  13.0.0git
Public Member Functions | List of all members
llvm::jitlink::InProcessMemoryManager Class Reference

A JITLinkMemoryManager that allocates in-process memory. More...

#include "llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h"

Inheritance diagram for llvm::jitlink::InProcessMemoryManager:
Inheritance graph
Collaboration diagram for llvm::jitlink::InProcessMemoryManager:
Collaboration graph

Public Member Functions

Expected< std::unique_ptr< Allocation > > allocate (const JITLinkDylib *JD, const SegmentsRequestMap &Request) override
 Create an Allocation object. More...

Additional Inherited Members

Detailed Description

A JITLinkMemoryManager that allocates in-process memory.

Definition at line 112 of file JITLinkMemoryManager.h.

Member Function Documentation

◆ allocate()

Expected< std::unique_ptr< JITLinkMemoryManager::Allocation > > llvm::jitlink::InProcessMemoryManager::allocate ( const JITLinkDylib JD,
const SegmentsRequestMap Request 

Create an Allocation object.

The JD argument represents the target JITLinkDylib, and can be used by JITLinkMemoryManager implementers to manage per-dylib allocation pools (e.g. one pre-reserved address space slab per dylib to ensure that all allocations for the dylib are within a certain range). The JD argument may be null (representing an allocation not associated with any JITDylib.

The request argument describes the segment sizes and permisssions being requested.

Implements llvm::jitlink::JITLinkMemoryManager.

Definition at line 20 of file JITLinkMemoryManager.cpp.

References llvm::alignTo(), llvm::sys::Memory::allocateMappedMemory(), assert(), llvm::sys::MemoryBlock::base(), base, llvm::errorCodeToError(), llvm::sys::Process::getPageSizeEstimate(), llvm::inconvertibleErrorCode(), llvm::sys::Memory::InvalidateInstructionCache(), llvm::isPowerOf2_64(), llvm::max(), llvm::sys::Memory::MF_EXEC, llvm::sys::Memory::MF_READ, llvm::sys::Memory::MF_WRITE, llvm::min(), move, llvm::pointerToJITTargetAddress(), llvm::sys::Memory::protectMappedMemory(), llvm::sys::Memory::releaseMappedMemory(), and llvm::Error::success().

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