diff options
| author | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-01-11 19:27:29 -0600 |
|---|---|---|
| committer | Ryan Houdek <Sonicadvance1@gmail.com> | 2015-01-11 19:27:29 -0600 |
| commit | 11a36ca8e28b233f34f5c48be19fabeea92f6d38 (patch) | |
| tree | fda5beb0a06cc15e7407a68237d468bc7ed04de6 /Source/Core/Common/MemoryUtil.cpp | |
| parent | 7105e5a8f01120f459300a81841e287fa6bbeec2 (diff) | |
| parent | 52b1a5459773c16554bf1a3fc583706054e0e4cc (diff) | |
Merge pull request #1820 from Tilka/valgrind
MemoryUtil: add comment for Valgrind
Diffstat (limited to 'Source/Core/Common/MemoryUtil.cpp')
| -rw-r--r-- | Source/Core/Common/MemoryUtil.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/Common/MemoryUtil.cpp b/Source/Core/Common/MemoryUtil.cpp index fd88726814..e36babb03d 100644 --- a/Source/Core/Common/MemoryUtil.cpp +++ b/Source/Core/Common/MemoryUtil.cpp @@ -21,6 +21,10 @@ #include <sys/mman.h> #endif +// Valgrind doesn't support MAP_32BIT. +// Uncomment the following line to be able to run Dolphin in Valgrind. +//#undef MAP_32BIT + #if !defined(_WIN32) && defined(_M_X86_64) && !defined(MAP_32BIT) #include <unistd.h> #define PAGE_MASK (getpagesize() - 1) @@ -65,7 +69,7 @@ void* AllocateExecutableMemory(size_t size, bool low) { ptr = nullptr; #endif - PanicAlert("Failed to allocate executable memory"); + PanicAlert("Failed to allocate executable memory. If you are running Dolphin in Valgrind, try '#undef MAP_32BIT'."); } #if !defined(_WIN32) && defined(_M_X86_64) && !defined(MAP_32BIT) else |
