From 2c419382c97c30e68c0cc60c8df9f98d5cf9ed80 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Sun, 18 Jul 2010 05:17:09 +0000 Subject: [PATCH] Slightly cleanup of mmap(2) flags: Move MAP_32BIT to MemoryUtil.h. MAP_VARIABLE is simply the absence of MAP_FIXED. Replace MAP_ANONYMOUS with the more traditional MAP_ANON - Linux is compatible. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5900 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/MemArena.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Source/Core/Common/Src/MemArena.cpp b/Source/Core/Common/Src/MemArena.cpp index 878ca1f289..987a26034a 100644 --- a/Source/Core/Common/Src/MemArena.cpp +++ b/Source/Core/Common/Src/MemArena.cpp @@ -16,12 +16,12 @@ // http://code.google.com/p/dolphin-emu/ #include "Common.h" +#include "MemoryUtil.h" #include "MemArena.h" #ifdef _WIN32 #include #else -#include #include #include #include @@ -29,10 +29,6 @@ #include #endif -#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) -#define MAP_ANONYMOUS MAP_ANON -#endif - #ifndef _WIN32 static const char* ram_temp_file = "/tmp/gc_mem.tmp"; #endif @@ -123,7 +119,8 @@ u8* MemArena::Find4GBBase() } return base; #else - void* base = mmap(0, 0x31000000, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_SHARED, 0, 0); + void* base = mmap(0, 0x31000000, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_SHARED, 0, 0); if (base == MAP_FAILED) { PanicAlert("Failed to map 1 GB of memory space: %s", strerror(errno)); return 0;