From b4ae200d0dde96c218e19421db8c095315ed5338 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sun, 23 Sep 2012 10:08:13 -0500 Subject: [PATCH] This changes a mmap in MemArena so you don't need 786MB of memory free to actually allocate the 1GB memory space in Linux 32bit. I was also running in to this issue in my development. Kudos to plbl4ster to actually taking the time to research this. Closes issue 5625. --- Source/Core/Common/Src/MemArena.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Core/Common/Src/MemArena.cpp b/Source/Core/Common/Src/MemArena.cpp index 4af9da3415..26a332f161 100644 --- a/Source/Core/Common/Src/MemArena.cpp +++ b/Source/Core/Common/Src/MemArena.cpp @@ -118,8 +118,7 @@ u8* MemArena::Find4GBBase() } return base; #else - void* base = mmap(0, 0x31000000, PROT_READ | PROT_WRITE, - MAP_ANON | MAP_SHARED, -1, 0); + void* base = mmap(0, 0x31000000, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0); if (base == MAP_FAILED) { PanicAlert("Failed to map 1 GB of memory space: %s", strerror(errno)); return 0;