mirror of
https://git.wownero.com/wownero/RandomWOW.git
synced 2024-12-22 15:58:53 +00:00
Fix missing failure check in allocMemoryPages() (#250)
This commit is contained in:
parent
cced5cab2f
commit
261d58c77f
@ -144,6 +144,8 @@ void* allocMemoryPages(size_t bytes) {
|
|||||||
#define PEXTRA 0
|
#define PEXTRA 0
|
||||||
#endif
|
#endif
|
||||||
mem = mmap(NULL, bytes, PAGE_READWRITE | RESERVED_FLAGS | PEXTRA, MAP_ANONYMOUS | MAP_PRIVATE | MEXTRA, -1, 0);
|
mem = mmap(NULL, bytes, PAGE_READWRITE | RESERVED_FLAGS | PEXTRA, MAP_ANONYMOUS | MAP_PRIVATE | MEXTRA, -1, 0);
|
||||||
|
if (mem == MAP_FAILED)
|
||||||
|
mem = NULL;
|
||||||
#if defined(USE_PTHREAD_JIT_WP) && defined(MAC_OS_VERSION_11_0) \
|
#if defined(USE_PTHREAD_JIT_WP) && defined(MAC_OS_VERSION_11_0) \
|
||||||
&& 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, *)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user