aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Cpu/Jit/JitMemoryAllocator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Cpu/Jit/JitMemoryAllocator.cs')
-rw-r--r--src/Ryujinx.Cpu/Jit/JitMemoryAllocator.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Ryujinx.Cpu/Jit/JitMemoryAllocator.cs b/src/Ryujinx.Cpu/Jit/JitMemoryAllocator.cs
new file mode 100644
index 00000000..4aa78d06
--- /dev/null
+++ b/src/Ryujinx.Cpu/Jit/JitMemoryAllocator.cs
@@ -0,0 +1,13 @@
+using ARMeilleure.Memory;
+using Ryujinx.Memory;
+
+namespace Ryujinx.Cpu.Jit
+{
+ public class JitMemoryAllocator : IJitMemoryAllocator
+ {
+ public IJitMemoryBlock Allocate(ulong size) => new JitMemoryBlock(size, MemoryAllocationFlags.None);
+ public IJitMemoryBlock Reserve(ulong size) => new JitMemoryBlock(size, MemoryAllocationFlags.Reserve | MemoryAllocationFlags.Jit);
+
+ public ulong GetPageSize() => MemoryBlock.GetPageSize();
+ }
+}