More linux...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@122 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-08-01 13:59:37 +00:00
parent 814af6c7b9
commit 9a4c66e066
10 changed files with 39 additions and 29 deletions

View File

@ -38,7 +38,7 @@
// This is purposedely not a full wrapper for virtualalloc/mmap, but it
// provides exactly the primitive operations that Dolphin needs.
void* AllocateExecutableMemory(int size)
void* AllocateExecutableMemory(int size, bool low)
{
#ifdef _WIN32
void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
@ -55,7 +55,7 @@ void* AllocateExecutableMemory(int size)
void* retval = mmap(0, size, PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_ANONYMOUS | MAP_PRIVATE
#ifdef __x86_64__
| MAP_32BIT
| (low ? MAP_32BIT : 0)
#endif
, -1, 0); // | MAP_FIXED
printf("mappah exe %p %i\n", retval, size);