mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
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
This commit is contained in:
@ -69,7 +69,9 @@ typedef signed __int16 s16;
|
||||
typedef signed __int8 s8;
|
||||
|
||||
#define GC_ALIGNED16(x) __declspec(align(16)) x
|
||||
#define GC_ALIGNED64(x) __declspec(align(64)) x
|
||||
#define GC_ALIGNED16_DECL(x) __declspec(align(16)) x
|
||||
#define GC_ALIGNED64_DECL(x) __declspec(align(64)) x
|
||||
|
||||
#else
|
||||
|
||||
|
11
Source/Core/Common/Src/FileUtil.cpp
Normal file
11
Source/Core/Common/Src/FileUtil.cpp
Normal file
@ -0,0 +1,11 @@
|
||||
#include "Common.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
bool File::Exists(const std::string &filename)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return GetFileAttributes(filename.c_str()) != INVALID_FILE_ATTRIBUTES;
|
||||
#else
|
||||
return true; //TODO
|
||||
#endif
|
||||
}
|
12
Source/Core/Common/Src/FileUtil.h
Normal file
12
Source/Core/Common/Src/FileUtil.h
Normal file
@ -0,0 +1,12 @@
|
||||
#ifndef _FILEUTIL_H
|
||||
#define _FILEUTIL_H
|
||||
|
||||
#include <string>
|
||||
|
||||
class File
|
||||
{
|
||||
public:
|
||||
static bool Exists(const std::string &filename);
|
||||
};
|
||||
|
||||
#endif
|
@ -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
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user