Merge pull request #1820 from Tilka/valgrind
MemoryUtil: add comment for Valgrind
This commit is contained in:
commit
11a36ca8e2
|
@ -21,6 +21,10 @@
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#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)
|
#if !defined(_WIN32) && defined(_M_X86_64) && !defined(MAP_32BIT)
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#define PAGE_MASK (getpagesize() - 1)
|
#define PAGE_MASK (getpagesize() - 1)
|
||||||
|
@ -65,7 +69,7 @@ void* AllocateExecutableMemory(size_t size, bool low)
|
||||||
{
|
{
|
||||||
ptr = nullptr;
|
ptr = nullptr;
|
||||||
#endif
|
#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)
|
#if !defined(_WIN32) && defined(_M_X86_64) && !defined(MAP_32BIT)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue