aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Tests/Cpu/CpuTest.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-03-09 23:12:57 -0300
committergdkchan <gab.dark.100@gmail.com>2018-03-09 23:12:57 -0300
commit5912bd2beb42e1853fdcf11e4bb87e063a0ef35b (patch)
tree5ad631cea858a30e6c300eba0fa7da7a8ca14799 /Ryujinx.Tests/Cpu/CpuTest.cs
parentbe0e4007dc92e24a77bdc36a40d2450c41d9b560 (diff)
Disable memory checks by default, even on debug, move ram memory allocation inside the CPU, since the size if fixed anyway, better heap region size
Diffstat (limited to 'Ryujinx.Tests/Cpu/CpuTest.cs')
-rw-r--r--Ryujinx.Tests/Cpu/CpuTest.cs8
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()