diff options
Diffstat (limited to 'Ryujinx.Tests')
| -rw-r--r-- | Ryujinx.Tests/Cpu/CpuTest.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Ryujinx.Tests/Cpu/CpuTest.cs b/Ryujinx.Tests/Cpu/CpuTest.cs index a4a3b33f..c4f0bbd7 100644 --- a/Ryujinx.Tests/Cpu/CpuTest.cs +++ b/Ryujinx.Tests/Cpu/CpuTest.cs @@ -2,8 +2,6 @@ using ChocolArm64; using ChocolArm64.Memory; using ChocolArm64.State; using NUnit.Framework; -using System; -using System.Runtime.InteropServices; using System.Threading; namespace Ryujinx.Tests.Cpu @@ -16,7 +14,6 @@ namespace Ryujinx.Tests.Cpu private long EntryPoint; - private IntPtr Ram; private AMemory Memory; private AThread Thread; @@ -28,9 +25,8 @@ namespace Ryujinx.Tests.Cpu EntryPoint = Position; - Ram = Marshal.AllocHGlobal((IntPtr)AMemoryMgr.RamSize); ATranslator Translator = new ATranslator(); - Memory = new AMemory(Ram); + Memory = new AMemory(); Memory.Manager.Map(Position, Size, 2, AMemoryPerm.Read | AMemoryPerm.Write | AMemoryPerm.Execute); Thread = new AThread(Translator, Memory, ThreadPriority.Normal, EntryPoint); } @@ -38,9 +34,9 @@ namespace Ryujinx.Tests.Cpu [TearDown] public void Teardown() { + Memory.Dispose(); Thread = null; Memory = null; - Marshal.FreeHGlobal(Ram); } protected void Reset() |
