13#ifndef LLVM_EXECUTIONENGINE_ORC_MAPPERJITLINKMEMORYMANAGER_H
14#define LLVM_EXECUTIONENGINE_ORC_MAPPERJITLINKMEMORYMANAGER_H
26 std::unique_ptr<MemoryMapper> Mapper);
28 template <
class MemoryMapperType,
class... Args>
31 auto Mapper = MemoryMapperType::Create(std::forward<Args>(
A)...);
33 return Mapper.takeError();
35 return std::make_unique<MapperJITLinkMemoryManager>(ReservationGranularity,
42 using JITLinkMemoryManager::allocate;
44 void deallocate(std::vector<FinalizedAlloc> Allocs,
47 using JITLinkMemoryManager::deallocate;
55 size_t ReservationUnits;
65 std::unique_ptr<MemoryMapper> Mapper;
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file implements a coalescing interval map for small objects.
Tagged union holding either a T or a Error.
typename Sizer::Allocator Allocator
Manages allocations of JIT memory.
unique_function< void(AllocResult)> OnAllocatedFunction
Called when allocation has been completed.
unique_function< void(Error)> OnDeallocatedFunction
Called when deallocation has completed.
void deallocate(std::vector< FinalizedAlloc > Allocs, OnDeallocatedFunction OnDeallocated) override
Deallocate a list of allocation objects.
static Expected< std::unique_ptr< MapperJITLinkMemoryManager > > CreateWithMapper(size_t ReservationGranularity, Args &&...A)
void allocate(const jitlink::JITLinkDylib *JD, jitlink::LinkGraph &G, OnAllocatedFunction OnAllocated) override
Start the allocation process.
This is an optimization pass for GlobalISel generic memory operations.