Browse Source

Merge remote-tracking branch 'remotes/origin/dev' into evo

evo
XMRig 2 years ago
parent
commit
5e13d78315
No known key found for this signature in database GPG Key ID: 446A53638BE94409
  1. 12
      src/crypto/common/VirtualMemory_unix.cpp

12
src/crypto/common/VirtualMemory_unix.cpp

@ -112,13 +112,19 @@ bool xmrig::VirtualMemory::protectRWX(void *p, size_t size)
bool xmrig::VirtualMemory::protectRX(void *p, size_t size)
{
bool result = true;
# if defined(XMRIG_OS_APPLE) && defined(XMRIG_ARM)
pthread_jit_write_protect_np(true);
flushInstructionCache(p, size);
return true;
# else
return mprotect(p, size, PROT_READ | PROT_EXEC) == 0;
result = (mprotect(p, size, PROT_READ | PROT_EXEC) == 0);
# endif
# if defined(XMRIG_ARM)
flushInstructionCache(p, size);
# endif
return result;
}

Loading…
Cancel
Save