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
This commit is contained in:
parent
be0e4007dc
commit
5912bd2beb
12 changed files with 177 additions and 207 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue