mirror of
https://git.wownero.com/wownero/RandomWOW.git
synced 2025-01-05 06:38:53 +00:00
Merge pull request #259 from SChernykh/fix_invalidate_order
Invalidate CPU I-cache on Apple Silicon
This commit is contained in:
commit
5bb4c7760d
@ -189,6 +189,7 @@ void setPagesRX(void* ptr, size_t bytes) {
|
|||||||
&& MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
|
&& MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0
|
||||||
if (__builtin_available(macOS 11.0, *)) {
|
if (__builtin_available(macOS 11.0, *)) {
|
||||||
pthread_jit_write_protect_np(1);
|
pthread_jit_write_protect_np(1);
|
||||||
|
__builtin___clear_cache((char*)ptr, ((char*)ptr) + bytes);
|
||||||
} else {
|
} else {
|
||||||
pageProtect(ptr, bytes, PAGE_EXECUTE_READ, &errfunc);
|
pageProtect(ptr, bytes, PAGE_EXECUTE_READ, &errfunc);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user