forked from MeloNX/MeloNX
feat: avoid filling pages when using private allocations
This commit is contained in:
parent
e9ab106f8f
commit
6334c3f90c
@ -119,7 +119,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||||||
Context.MemoryManager.IncrementPagesReferenceCount(srcPa, pagesCount);
|
Context.MemoryManager.IncrementPagesReferenceCount(srcPa, pagesCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldFillPages)
|
if (shouldFillPages && (Supports4KBPages || !flags.HasFlag(MemoryMapFlags.Private) || fillValue != 0))
|
||||||
{
|
{
|
||||||
_cpuMemory.Fill(dstVa, size, fillValue);
|
_cpuMemory.Fill(dstVa, size, fillValue);
|
||||||
}
|
}
|
||||||
@ -149,7 +149,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Memory
|
|||||||
|
|
||||||
_cpuMemory.Map(currentVa, addr, size, flags);
|
_cpuMemory.Map(currentVa, addr, size, flags);
|
||||||
|
|
||||||
if (shouldFillPages)
|
if (shouldFillPages && (Supports4KBPages || !flags.HasFlag(MemoryMapFlags.Private) || fillValue != 0))
|
||||||
{
|
{
|
||||||
_cpuMemory.Fill(currentVa, size, fillValue);
|
_cpuMemory.Fill(currentVa, size, fillValue);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user