aboutsummaryrefslogblamecommitdiff
path: root/src/Ryujinx.Cpu/Jit/JitMemoryAllocator.cs
blob: 4aa78d06ca295fd54e106a8bafa4b0b3cb968bba (plain) (tree)
1
2
3
4
5
6
7
8
9

                            
                         
 
                                                         
                                                                                                            
                                                                                                                                          
                                                                
     
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();
    }
}