mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-09 18:45:40 +00:00
Merge pull request #705 from Sonicadvance1/fix-memoryutil-check
Fixes a check for what mmap returns.
This commit is contained in:
commit
c5188c76b3
@ -54,13 +54,13 @@ void* AllocateExecutableMemory(size_t size, bool low)
|
|||||||
// printf("Mapped executable memory at %p (size %ld)\n", ptr,
|
// printf("Mapped executable memory at %p (size %ld)\n", ptr,
|
||||||
// (unsigned long)size);
|
// (unsigned long)size);
|
||||||
|
|
||||||
#if defined(__FreeBSD__)
|
#ifdef _WIN32
|
||||||
|
if (ptr == nullptr)
|
||||||
|
{
|
||||||
|
#else
|
||||||
if (ptr == MAP_FAILED)
|
if (ptr == MAP_FAILED)
|
||||||
{
|
{
|
||||||
ptr = nullptr;
|
ptr = nullptr;
|
||||||
#else
|
|
||||||
if (ptr == nullptr)
|
|
||||||
{
|
|
||||||
#endif
|
#endif
|
||||||
PanicAlert("Failed to allocate executable memory");
|
PanicAlert("Failed to allocate executable memory");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user