Skip to content

Conversation

lhames
Copy link
Contributor

@lhames lhames commented Oct 9, 2025

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.

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.
@lhames lhames merged commit 891f002 into llvm:main Oct 9, 2025
8 of 9 checks passed
@lhames lhames deleted the orc-rt-simplenativememorymap branch October 9, 2025 02:10
svkeerthy pushed a commit that referenced this pull request Oct 9, 2025
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.
clingfei pushed a commit to clingfei/llvm-project that referenced this pull request Oct 10, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant