[all-commits] [llvm/llvm-project] 891f00: [orc-rt] Add SimpleNativeMemoryMap. (#162584)

Lang Hames via All-commits all-commits at lists.llvm.org
Wed Oct 8 19:10:56 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 891f002026df122b36813b9e1819769c94327503
      https://github.com/llvm/llvm-project/commit/891f002026df122b36813b9e1819769c94327503
  Author: Lang Hames <lhames at gmail.com>
  Date:   2025-10-09 (Thu, 09 Oct 2025)

  Changed paths:
    M orc-rt/include/CMakeLists.txt
    M orc-rt/include/orc-rt/SPSWrapperFunction.h
    A orc-rt/include/orc-rt/SimpleNativeMemoryMap.h
    M orc-rt/lib/executor/CMakeLists.txt
    A orc-rt/lib/executor/SimpleNativeMemoryMap.cpp
    A orc-rt/lib/executor/Unix/NativeMemoryAPIs.inc
    M orc-rt/unittests/CMakeLists.txt
    A orc-rt/unittests/SimpleNativeMemoryMapTest.cpp

  Log Message:
  -----------
  [orc-rt] Add SimpleNativeMemoryMap. (#162584)

SimpleNativeMemoryMap is a memory allocation backend for use with ORC.
It can...

1. Reserve slabs of address space.
2. Finalize regions of memory within a reserved slab: copying content
into requested addresses, applying memory protections, running
finalization actions, and storing deallocation actions to be run by
deallocate.
3. Deallocate finalized memory regions: running deallocate actions and,
if possible, making memory in these regions available for use by future
finalization operations. (Some systems prohibit reuse of executable
memory. On these systems deallocated memory is no longer usable within
the process).
4. Release reserved slabs. This runs deallocate for any
not-yet-deallocated finalized regions, and then (if possible) returns
the address space to system. (On systems that prohibit reuse of
executable memory parts of the released address space may be permanently
unusable by the process).

SimpleNativeMemoryMap is intended primarily for use by
llvm::orc::JITLinkMemoryManager implementations to allocate JIT'd code
and data.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list