From 4467b545301876691f18c958698393046b26a8d7 Mon Sep 17 00:00:00 2001 From: LotP1 <68976644+LotP1@users.noreply.github.com> Date: Thu, 4 Dec 2025 12:27:43 +0100 Subject: [PATCH] Revert "experimental caching of memory array" This reverts commit c5906bc6af56e699d6667eb0a00561929e65ca82. potentially causes a race condition, reverting. --- src/Ryujinx.Cpu/Jit/MemoryManagerHostTracked.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Ryujinx.Cpu/Jit/MemoryManagerHostTracked.cs b/src/Ryujinx.Cpu/Jit/MemoryManagerHostTracked.cs index c1840adf7..0ad96c6ae 100644 --- a/src/Ryujinx.Cpu/Jit/MemoryManagerHostTracked.cs +++ b/src/Ryujinx.Cpu/Jit/MemoryManagerHostTracked.cs @@ -263,9 +263,6 @@ namespace Ryujinx.Cpu.Jit } } - //Might cause issues, if so revert to old solution - byte[] _cachedArray = []; - public override ReadOnlySpan GetSpan(ulong va, int size, bool tracked = false) { if (size == 0) @@ -284,12 +281,7 @@ namespace Ryujinx.Cpu.Jit } else { - if (_cachedArray.Length < size) - { - Array.Resize(ref _cachedArray, size); - } - - Span data = _cachedArray.AsSpan(0, size); + Span data = new byte[size]; Read(va, data);