IndexVirtual Memoryasmjit::VirtMem::ProtectJitReadWriteScope

asmjit::VirtMem::ProtectJitReadWriteScope Class Reference [¶]

JIT protection scope that prepares the given memory block to be written to in the current thread.

It calls VirtMem::protect_jit_memory(VirtMem::ProtectJitAccess::kReadWrite) at construction time and VirtMem::protect_jit_memory(VirtMem::ProtectJitAccess::kReadExecute) combined with flush_instruction_cache() in destructor. The purpose of this class is to make writing to JIT memory easier.

Public Members

Members

Member Functions

Construction & Destruction

VirtMem::ProtectJitReadWriteScope::ProtectJitReadWriteScope(
void* rx_ptr,
size_t size,
)noexcept[¶]

Makes the given memory block RW protected.

VirtMem::ProtectJitReadWriteScope::~ProtectJitReadWriteScope()noexcept[¶]

Makes the memory block RX protected again and flushes instruction cache.