Late map bridge too
This commit is contained in:
parent
3b91233e4a
commit
c56a24e83b
1 changed files with 10 additions and 0 deletions
|
@ -208,6 +208,7 @@ namespace Ryujinx.Cpu.Jit
|
||||||
private ulong _cachedFirstPagePa;
|
private ulong _cachedFirstPagePa;
|
||||||
private ulong _cachedLastPagePa;
|
private ulong _cachedLastPagePa;
|
||||||
private MemoryBlock _firstPageMemoryForUnmap;
|
private MemoryBlock _firstPageMemoryForUnmap;
|
||||||
|
private ulong _firstPageOffsetForLateMap;
|
||||||
|
|
||||||
public ulong Address { get; }
|
public ulong Address { get; }
|
||||||
public ulong Size { get; }
|
public ulong Size { get; }
|
||||||
|
@ -331,6 +332,7 @@ namespace Ryujinx.Cpu.Jit
|
||||||
|
|
||||||
_baseMemory.MapView(firstPageMemory, firstPageOffset, Size, _hostPageSize);
|
_baseMemory.MapView(firstPageMemory, firstPageOffset, Size, _hostPageSize);
|
||||||
_firstPageMemoryForUnmap = firstPageMemory;
|
_firstPageMemoryForUnmap = firstPageMemory;
|
||||||
|
_firstPageOffsetForLateMap = firstPageOffset;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -603,6 +605,14 @@ namespace Ryujinx.Cpu.Jit
|
||||||
_baseMemory.LateMapView(map.PrivateAllocation.Memory, map.PrivateAllocation.Offset, map.Address - Address, map.Size);
|
_baseMemory.LateMapView(map.PrivateAllocation.Memory, map.PrivateAllocation.Offset, map.Address - Address, map.Size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MemoryBlock firstPageMemory = _firstPageMemoryForUnmap;
|
||||||
|
ulong firstPageOffset = _firstPageOffsetForLateMap;
|
||||||
|
|
||||||
|
if (firstPageMemory != null)
|
||||||
|
{
|
||||||
|
_baseMemory.LateMapView(firstPageMemory, firstPageOffset, Size, _hostPageSize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrivateRange GetFirstPrivateAllocation(ulong va, ulong size, out ulong nextVa)
|
public PrivateRange GetFirstPrivateAllocation(ulong va, ulong size, out ulong nextVa)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue