Browse Source
[settings] Disable fastmem on Linux systems with non-4kb page sizes
Asahi, etc
Signed-off-by: crueter <crueter@eden-emu.dev>
disable-16kb-fastmem
crueter
2 days ago
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
1 changed files with
8 additions and
1 deletions
-
src/common/settings.cpp
|
|
|
@ -27,6 +27,10 @@ |
|
|
|
#include "common/settings.h"
|
|
|
|
#include "common/time_zone.h"
|
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace Settings { |
|
|
|
|
|
|
|
// Clang 14 and earlier have errors when explicitly instantiating these classes
|
|
|
|
@ -178,7 +182,10 @@ bool IsFastmemEnabled() { |
|
|
|
return bool(values.cpuopt_fastmem); |
|
|
|
else if (values.cpu_accuracy.GetValue() == CpuAccuracy::Unsafe) |
|
|
|
return bool(values.cpuopt_unsafe_host_mmu); |
|
|
|
#if !defined(__APPLE__) && !defined(__linux__) && !defined(__ANDROID__) && !defined(_WIN32)
|
|
|
|
#if defined(__linux__)
|
|
|
|
// Only 4kb systems support host MMU right now
|
|
|
|
return getpagesize() == 4096; |
|
|
|
#elif !defined(__APPLE__) && !defined(__ANDROID__) && !defined(_WIN32)
|
|
|
|
return false; |
|
|
|
#else
|
|
|
|
return true; |
|
|
|
|