Add comments to explain stuff and other stuff

This commit is contained in:
Stossy11 2025-02-07 10:33:43 +11:00
parent 0b6518d7e3
commit c8db129402
12 changed files with 60 additions and 30 deletions

View file

@ -46,7 +46,7 @@ namespace Ryujinx.Memory
private const IntPtr TASK_NULL = 0;
private static readonly IntPtr _selfTask;
private static readonly int DEFAULT_CHUNK_SIZE = 16 * 1024 * 1024;
private static readonly int DEFAULT_CHUNK_SIZE = 1024 * 1024;
static MachJitWorkaround()
{
@ -61,6 +61,8 @@ namespace Ryujinx.Memory
{
return totalSize;
}
chunkSize /= 2;
int chunkCount = Math.Max(4, totalSize / DEFAULT_CHUNK_SIZE);
return (totalSize + chunkCount - 1) / chunkCount;
@ -211,4 +213,4 @@ namespace Ryujinx.Memory
}
}
}
}
}