summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/MemoryUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/Src/MemoryUtil.cpp')
-rw-r--r--Source/Core/Common/Src/MemoryUtil.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/Common/Src/MemoryUtil.cpp b/Source/Core/Common/Src/MemoryUtil.cpp
index a6c89615ab..5ccf5729d5 100644
--- a/Source/Core/Common/Src/MemoryUtil.cpp
+++ b/Source/Core/Common/Src/MemoryUtil.cpp
@@ -62,6 +62,13 @@ void* AllocateExecutableMemory(size_t size, bool low)
, -1, 0); // | MAP_FIXED
// printf("Mapped executable memory at %p (size %i)\n", retval, size);
+ if ((u64)ptr >= 0x80000000)
+ {
+ // Should only happen in 64bit OSX
+ // Just a reminder, to show a OSX user that it may fail
+ PanicAlert("Executable memory ended up above 2GB!");
+ }
+
if (!retval)
{
PanicAlert("Failed to allocate executable memory, errno=%i", errno);