mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-25 16:07:10 +02:00
Add NCE code
This commit is contained in:
parent
a1e34041fa
commit
0970972f0d
40 changed files with 2702 additions and 40 deletions
|
@ -96,6 +96,11 @@ namespace Ryujinx.Memory
|
|||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Reprotect(ulong va, ulong size, MemoryPermission permission)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public T Read<T>(ulong va) where T : unmanaged
|
||||
{
|
||||
|
|
|
@ -44,6 +44,14 @@ namespace Ryujinx.Memory
|
|||
/// <param name="size">Size of the range to be unmapped</param>
|
||||
void Unmap(ulong va, ulong size);
|
||||
|
||||
/// <summary>
|
||||
/// Reprotects a previously mapped range of virtual memory.
|
||||
/// </summary>
|
||||
/// <param name="va">Virtual address of the range to be reprotected</param>
|
||||
/// <param name="size">Size of the range to be reprotected</param>
|
||||
/// <param name="permission">New protection of the memory range</param>
|
||||
void Reprotect(ulong va, ulong size, MemoryPermission permission);
|
||||
|
||||
/// <summary>
|
||||
/// Reads data from CPU mapped memory.
|
||||
/// </summary>
|
||||
|
|
|
@ -16,15 +16,15 @@ namespace Ryujinx.Memory
|
|||
|
||||
public static IntPtr Allocate(ulong size, bool forJit)
|
||||
{
|
||||
return AllocateInternal(size, MmapProts.PROT_READ | MmapProts.PROT_WRITE, forJit);
|
||||
return AllocateInternal(size, MmapProts.PROT_READ | MmapProts.PROT_WRITE, forJit, false);
|
||||
}
|
||||
|
||||
public static IntPtr Reserve(ulong size, bool forJit)
|
||||
{
|
||||
return AllocateInternal(size, MmapProts.PROT_NONE, forJit);
|
||||
return AllocateInternal(size, MmapProts.PROT_NONE, forJit, false);
|
||||
}
|
||||
|
||||
private static IntPtr AllocateInternal(ulong size, MmapProts prot, bool forJit, bool shared = false)
|
||||
private static IntPtr AllocateInternal(ulong size, MmapProts prot, bool forJit, bool shared)
|
||||
{
|
||||
MmapFlags flags = MmapFlags.MAP_ANONYMOUS;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue