mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-06 15:42:38 -05:00
Compare commits
2 Commits
b5de214ff9
...
bc4dd11761
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc4dd11761 | ||
|
|
7b52a41459 |
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user