DiskCache: use memory-mapped IO for reads when possible

On Wine, use a unixlib call to get a quality mapping that can track a growing
file.
This commit is contained in:
Pierre-Loup A. Griffais committed 2026-08-27 21:15:22 -07:00
1 parent 0814780c2f
commit 2a82f58195
12 files changed
+139 -8

No files matched your search

+4
View File
@@ -11,6 +11,7 @@ $end_info$
#include <FEXCore/Core/SignalDelegator.h>
#include <FEXCore/Core/Context.h>
#include <FEXCore/Core/CoreState.h>
#include <FEXCore/Core/DiskCacheFileMapper.h>
#include <FEXCore/Debug/InternalThreadState.h>
#include <FEXCore/HLE/SyscallHandler.h>
#include <FEXCore/Config/Config.h>
@@ -606,6 +607,9 @@ NTSTATUS ProcessInit() {
FEX::Windows::Allocator::SetupHooks(NtDll);
FEX::Windows::UnixLib::Init(NtDll);
if (FEX::Windows::UnixLib::Available()) {
FEXCore::DiskCache::SetFileMapper(FEX::Windows::UnixLib::MapFile);
}
{
auto HostFeatures = FEX::Windows::CPUFeatures::FetchHostFeatures(IsWine, FEXCore::HostFeatures::HostTypeEnum::Arm64ec);