mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-09-10 17:58:50 +02:00
Reduce temporary copy/fill buffer size (#1926)
This commit is contained in:
parent
1364f36161
commit
734747ae58
2 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@ namespace Ryujinx.Memory
|
||||||
|
|
||||||
void Fill(ulong va, ulong size, byte value)
|
void Fill(ulong va, ulong size, byte value)
|
||||||
{
|
{
|
||||||
const int MaxChunkSize = 1 << 30;
|
const int MaxChunkSize = 1 << 24;
|
||||||
|
|
||||||
for (ulong subOffset = 0; subOffset < size; subOffset += MaxChunkSize)
|
for (ulong subOffset = 0; subOffset < size; subOffset += MaxChunkSize)
|
||||||
{
|
{
|
||||||
|
|
|
@ -136,7 +136,7 @@ namespace Ryujinx.Memory
|
||||||
/// <exception cref="InvalidMemoryRegionException">Throw when <paramref name="srcOffset"/>, <paramref name="dstOffset"/> or <paramref name="size"/> is out of range</exception>
|
/// <exception cref="InvalidMemoryRegionException">Throw when <paramref name="srcOffset"/>, <paramref name="dstOffset"/> or <paramref name="size"/> is out of range</exception>
|
||||||
public void Copy(ulong dstOffset, ulong srcOffset, ulong size)
|
public void Copy(ulong dstOffset, ulong srcOffset, ulong size)
|
||||||
{
|
{
|
||||||
const int MaxChunkSize = 1 << 30;
|
const int MaxChunkSize = 1 << 24;
|
||||||
|
|
||||||
for (ulong offset = 0; offset < size; offset += MaxChunkSize)
|
for (ulong offset = 0; offset < size; offset += MaxChunkSize)
|
||||||
{
|
{
|
||||||
|
@ -155,7 +155,7 @@ namespace Ryujinx.Memory
|
||||||
/// <exception cref="InvalidMemoryRegionException">Throw when either <paramref name="offset"/> or <paramref name="size"/> are out of range</exception>
|
/// <exception cref="InvalidMemoryRegionException">Throw when either <paramref name="offset"/> or <paramref name="size"/> are out of range</exception>
|
||||||
public void ZeroFill(ulong offset, ulong size)
|
public void ZeroFill(ulong offset, ulong size)
|
||||||
{
|
{
|
||||||
const int MaxChunkSize = 1 << 30;
|
const int MaxChunkSize = 1 << 24;
|
||||||
|
|
||||||
for (ulong subOffset = 0; subOffset < size; subOffset += MaxChunkSize)
|
for (ulong subOffset = 0; subOffset < size; subOffset += MaxChunkSize)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue