13#ifndef LLVM_EXECUTIONENGINE_ORC_MAPPERJITLINKMEMORYMANAGER_H
14#define LLVM_EXECUTIONENGINE_ORC_MAPPERJITLINKMEMORYMANAGER_H
28 std::unique_ptr<MemoryMapper> Mapper);
30 template <
class MemoryMapperType,
class... Args>
33 auto Mapper = MemoryMapperType::Create(std::forward<Args>(
A)...);
35 return Mapper.takeError();
37 return std::make_unique<MapperJITLinkMemoryManager>(ReservationGranularity,
42 OnAllocatedFunction OnAllocated)
override;
44 using JITLinkMemoryManager::allocate;
46 void deallocate(std::vector<FinalizedAlloc> Allocs,
47 OnDeallocatedFunction OnDeallocated)
override;
49 using JITLinkMemoryManager::deallocate;
57 size_t ReservationUnits;
61 AvailableMemoryMap::Allocator AMAllocator;
67 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.
Manages allocations of JIT memory.
static Expected< std::unique_ptr< MapperJITLinkMemoryManager > > CreateWithMapper(size_t ReservationGranularity, Args &&...A)
MapperJITLinkMemoryManager(size_t ReservationGranularity, std::unique_ptr< MemoryMapper > Mapper)
SmartMutex< false > Mutex
Mutex - A standard, always enforced mutex.
This is an optimization pass for GlobalISel generic memory operations.