diff options
| author | hrydgard <hrydgard@gmail.com> | 2008-07-16 20:50:16 +0000 |
|---|---|---|
| committer | hrydgard <hrydgard@gmail.com> | 2008-07-16 20:50:16 +0000 |
| commit | ea934759e15c94ad2fa67e76e11f5d469ebfccf4 (patch) | |
| tree | 43dd6f2fa6a3e747e0d81c602d5490d02b10b087 /Source/Core/Common/Src/MemArena.cpp | |
| parent | cb5072c3e4cf66d33d30697984a9179534334b38 (diff) | |
Mostly cleanup and some better crash messages. Also enabled partial block linking (see JitCache.cpp), should give a small speedup but may cause problems, please report!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@12 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/MemArena.cpp')
| -rw-r--r-- | Source/Core/Common/Src/MemArena.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/Common/Src/MemArena.cpp b/Source/Core/Common/Src/MemArena.cpp index f577373fdd..4455f99004 100644 --- a/Source/Core/Common/Src/MemArena.cpp +++ b/Source/Core/Common/Src/MemArena.cpp @@ -104,11 +104,10 @@ u64 MemArena::Find4GBBase() {
#ifdef _M_X64
#ifdef _WIN32
- // The highest thing in any 1GB section of memory space is the locked cache. We only need to fit it.
+ // 64 bit
u8* base = (u8*)VirtualAlloc(0, 0xE1000000, MEM_RESERVE, PAGE_READWRITE);
VirtualFree(base, 0, MEM_RELEASE);
return((u64)base);
-
#else
// Very precarious - mmap cannot return an error when trying to map already used pages.
// This makes the Windows approach above unusable on Linux, so we will simply pray...
@@ -116,12 +115,13 @@ u64 MemArena::Find4GBBase() #endif
#else
- // Only grab a bit less than 1GB
+ // 32 bit
+ // The highest thing in any 1GB section of memory space is the locked cache. We only need to fit it.
u8* base = (u8*)VirtualAlloc(0, 0x31000000, MEM_RESERVE, PAGE_READWRITE);
- VirtualFree(base, 0, MEM_RELEASE);
+ if (base) {
+ VirtualFree(base, 0, MEM_RELEASE);
+ }
return((u64)base);
#endif
}
-
-
|
