Write a shared-memory based JITLinkMemoryManager.
LLVM’s JIT uses the JITLinkMemoryManager
interface to allocate both working memory (where the JIT fixes up the relocatable objects produced by the compiler) and target memory (where the JIT’d code will reside in the target). JITLinkMemoryManager
instances are also responsible for transporting fixed-up code from working memory to target memory. LLVM has an existing cross-process allocator that uses remote procedure calls (RPC) to allocate and copy bytes to the target process, however a more attractive solution (when the JIT and target process share the same physical memory) would be to use shared memory pages to avoid copies between processes.
Expected results
Implement a shared-memory based JITLinkMemoryManager
:
- Write generic LLVM APIs for shared memory allocation.
- Write a
JITLinkMemoryManager
that uses these generic APIs to allocate shared working-and-target memory. - Make an extensive performance study of the approach.
Desirable skills
Intermediate C++; Understanding of LLVM and the LLVM JIT in particular; Understanding of virtual memory management APIs.
Project type
Large