MapperJITLinkMemoryManager supports executor memory management using any
implementation of MemoryMapper to do the transfer such as in process or
shared memory based.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Otherwise LGTM. Nice work!
llvm/include/llvm/ExecutionEngine/Orc/MemoryMapper.h | ||
---|---|---|
46 | SharedMemoryMapper will need a definition of this now too. | |
llvm/lib/ExecutionEngine/Orc/MemoryMapper.cpp | ||
31 | getPageSize can fail -- this needs to return an error. The usual idiom is a named constructor: class InProcessMemoryMapper ... { public: Expected<InProcessMemoryMapper> Create() { if (auto PageSize = sys::Process::getPageSize()) return InProcessMemoryMapper(*PageSize); else return PageSize.takeError(); } InProcessMemoryMapper(size_t PageSize) : PageSize(PageSize) {} ... } |
Added support for new SharedMemoryMapper
Improved error handling with create() methods
Otherwise LGTM.
llvm/include/llvm/ExecutionEngine/Orc/MemoryMapper.h | ||
---|---|---|
85 | Create methods _usually_ buck the method naming convention and use an uppercase 'C' to emphasize that they're named constructors (though honestly there's plenty of instances of both styles in the codebase). Since ORC more consistently uses upper-case 'C', we should stick with that for now. |
SharedMemoryMapper will need a definition of this now too.