|
infix
A JIT-Powered FFI Library for C
|
Internal representation of an executable memory block for JIT code. More...
#include <infix_internals.h>
Public Attributes | |
| int | shm_fd |
| void * | rx_ptr |
| void * | rw_ptr |
| size_t | size |
Internal representation of an executable memory block for JIT code.
This struct encapsulates the platform-specific details of allocating and managing executable memory in a way that is compliant with modern OS security features like W^X (Write XOR Execute). It supports two primary strategies:
rw_ptr). After the JIT compiler writes the machine code to this region, its permissions are changed to Read-Execute. In this model, rx_ptr and rw_ptr point to the same address.rw_ptr) and once as Read-Execute (rx_ptr). The pointers have different virtual addresses but point to the same physical memory. This is required on systems with stricter W^X enforcement. | void* infix_executable_t::rw_ptr |
The read-write memory address. The JIT compiler writes machine code here.
| void* infix_executable_t::rx_ptr |
The read-execute memory address. This is the callable function pointer.
| int infix_executable_t::shm_fd |
The file descriptor for shared memory on dual-mapping POSIX systems. -1 otherwise.
| size_t infix_executable_t::size |
The size of the allocated memory region in bytes.