1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-19 20:22:46 -05:00

Make JIT memory read-only after patching is done

This commit is contained in:
SChernykh
2019-01-19 11:22:54 +01:00
parent 897ff83dcd
commit 31a571dc70
4 changed files with 15 additions and 0 deletions

View File

@@ -100,6 +100,12 @@ void *Mem::allocateExecutableMemory(size_t size)
}
void Mem::protectExecutableMemory(void *p, size_t size)
{
mprotect(p, size, PROT_READ | PROT_EXEC);
}
void Mem::flushInstructionCache(void *p, size_t size)
{
# ifndef __FreeBSD__