summaryrefslogtreecommitdiffstats
path: root/src/common/memory_util.cpp
diff options
context:
space:
mode:
authorfearlessTobi <thm.frey@gmail.com>2018-07-07 13:59:18 +0200
committerfearlessTobi <thm.frey@gmail.com>2018-07-07 13:59:18 +0200
commit70a6691e3be2fa7178c1c6cb43ed4435cbabdd0c (patch)
treed383e9925ec3fe864f75a3feba1896eec41689b3 /src/common/memory_util.cpp
parentMerge pull request #631 from lioncash/dynarmic (diff)
downloadyuzu-70a6691e3be2fa7178c1c6cb43ed4435cbabdd0c.tar
yuzu-70a6691e3be2fa7178c1c6cb43ed4435cbabdd0c.tar.gz
yuzu-70a6691e3be2fa7178c1c6cb43ed4435cbabdd0c.tar.bz2
yuzu-70a6691e3be2fa7178c1c6cb43ed4435cbabdd0c.tar.lz
yuzu-70a6691e3be2fa7178c1c6cb43ed4435cbabdd0c.tar.xz
yuzu-70a6691e3be2fa7178c1c6cb43ed4435cbabdd0c.tar.zst
yuzu-70a6691e3be2fa7178c1c6cb43ed4435cbabdd0c.zip
Diffstat (limited to '')
-rw-r--r--src/common/memory_util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp
index 5d89209ed..09462ccee 100644
--- a/src/common/memory_util.cpp
+++ b/src/common/memory_util.cpp
@@ -16,7 +16,7 @@
#include <sys/mman.h>
#endif
-#if !defined(_WIN32) && defined(ARCHITECTURE_X64) && !defined(MAP_32BIT)
+#if !defined(_WIN32) && defined(ARCHITECTURE_x86_64) && !defined(MAP_32BIT)
#include <unistd.h>
#define PAGE_MASK (getpagesize() - 1)
#define round_page(x) ((((unsigned long)(x)) + PAGE_MASK) & ~(PAGE_MASK))
@@ -30,7 +30,7 @@ void* AllocateExecutableMemory(size_t size, bool low) {
void* ptr = VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
#else
static char* map_hint = nullptr;
-#if defined(ARCHITECTURE_X64) && !defined(MAP_32BIT)
+#if defined(ARCHITECTURE_x86_64) && !defined(MAP_32BIT)
// This OS has no flag to enforce allocation below the 4 GB boundary,
// but if we hint that we want a low address it is very likely we will
// get one.
@@ -42,7 +42,7 @@ void* AllocateExecutableMemory(size_t size, bool low) {
#endif
void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_ANON | MAP_PRIVATE
-#if defined(ARCHITECTURE_X64) && defined(MAP_32BIT)
+#if defined(ARCHITECTURE_x86_64) && defined(MAP_32BIT)
| (low ? MAP_32BIT : 0)
#endif
,
@@ -57,7 +57,7 @@ void* AllocateExecutableMemory(size_t size, bool low) {
#endif
LOG_ERROR(Common_Memory, "Failed to allocate executable memory");
}
-#if !defined(_WIN32) && defined(ARCHITECTURE_X64) && !defined(MAP_32BIT)
+#if !defined(_WIN32) && defined(ARCHITECTURE_x86_64) && !defined(MAP_32BIT)
else {
if (low) {
map_hint += size;