From 60ccb2f44d4b8dc621d14efd96d5d8981c959d24 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Wed, 21 Aug 2013 00:12:53 -0500 Subject: [PATCH] [Android] Fix Android 4.3 from crashing on my devices. This was annoying to find. --- Source/Core/Common/Src/MemArena.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/Common/Src/MemArena.cpp b/Source/Core/Common/Src/MemArena.cpp index ce0ccb2d3b..b7400a978e 100644 --- a/Source/Core/Common/Src/MemArena.cpp +++ b/Source/Core/Common/Src/MemArena.cpp @@ -152,7 +152,11 @@ u8* MemArena::Find4GBBase() PanicAlert("Failed to map 1 GB of memory space: %s", strerror(errno)); return 0; } +#ifndef ANDROID + // Android 4.3 changes how munmap works which causes crashes. + // Keep the memory space after allocating it... munmap(base, MemSize); +#endif return static_cast(base); #endif #endif