aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs
diff options
context:
space:
mode:
authorWunk <wunkolo@gmail.com>2022-11-16 14:27:42 -0800
committerGitHub <noreply@github.com>2022-11-16 23:27:42 +0100
commitd536cc8ae6d6725780365d858f2fd64b66d90b7f (patch)
treeef0767a9bc808ba15967607b79a0e3e83924b30b /Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs
parentd751da84f941e0d089040cb7aad2c1b3224ae6b7 (diff)
Update units of memory from decimal to binary prefixes (#3716)1.1.349
`MB` and `GB` can either be interpreted as having base-10 units, or base-2. `MiB` and `GiB` removes this discrepancy so that units of memory are always interpreted using base-2 units.
Diffstat (limited to 'Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs')
-rw-r--r--Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs b/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs
index 069cd5aa..cd4a3d82 100644
--- a/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs
+++ b/Ryujinx.Common/SystemInfo/LinuxSystemInfo.cs
@@ -36,13 +36,13 @@ namespace Ryujinx.Common.SystemInfo
ParseKeyValues("/proc/meminfo", memDict);
- // Entries are in KB
- ulong.TryParse(memDict["MemTotal"]?.Split(' ')[0], NumberStyles.Integer, CultureInfo.InvariantCulture, out ulong totalKB);
- ulong.TryParse(memDict["MemAvailable"]?.Split(' ')[0], NumberStyles.Integer, CultureInfo.InvariantCulture, out ulong availableKB);
+ // Entries are in KiB
+ ulong.TryParse(memDict["MemTotal"]?.Split(' ')[0], NumberStyles.Integer, CultureInfo.InvariantCulture, out ulong totalKiB);
+ ulong.TryParse(memDict["MemAvailable"]?.Split(' ')[0], NumberStyles.Integer, CultureInfo.InvariantCulture, out ulong availableKiB);
CpuName = $"{cpuName} ; {LogicalCoreCount} logical";
- RamTotal = totalKB * 1024;
- RamAvailable = availableKB * 1024;
+ RamTotal = totalKiB * 1024;
+ RamAvailable = availableKiB * 1024;
}
private static void ParseKeyValues(string filePath, Dictionary<string, string> itemDict)