mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-23 14:52:52 -05:00
Make JIT memory read-only after patching is done
This commit is contained in:
@@ -191,6 +191,13 @@ void *Mem::allocateExecutableMemory(size_t size)
|
||||
}
|
||||
|
||||
|
||||
void Mem::protectExecutableMemory(void *p, size_t size)
|
||||
{
|
||||
DWORD oldProtect;
|
||||
VirtualProtect(p, size, PAGE_EXECUTE_READ, &oldProtect);
|
||||
}
|
||||
|
||||
|
||||
void Mem::flushInstructionCache(void *p, size_t size)
|
||||
{
|
||||
::FlushInstructionCache(GetCurrentProcess(), p, size);
|
||||
|
||||
Reference in New Issue
Block a user