From 6a35b68fdcd6df64484dade8555c4b314a2b49ad Mon Sep 17 00:00:00 2001 From: Reece Date: Thu, 20 Jan 2022 19:23:37 +0000 Subject: [PATCH] [*] force upcast to u64 under ram calc --- Source/HWInfo/RamInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/HWInfo/RamInfo.cpp b/Source/HWInfo/RamInfo.cpp index a87b114d..02145ec6 100644 --- a/Source/HWInfo/RamInfo.cpp +++ b/Source/HWInfo/RamInfo.cpp @@ -157,7 +157,7 @@ namespace Aurora::HWInfo #elif defined(AURORA_IS_BSD_DERIVED) auto vmInfo = GetVMInfo(); - auto pageSize = QueryBsdHwStat(HW_PAGESIZE).value_or(4096); + auto pageSize = AuUInt64(QueryBsdHwStat(HW_PAGESIZE).value_or(4096)); auto totalMem = AuUInt64(vmInfo.t_vm) * pageSize; auto freeMem = AuUInt64(vmInfo.t_free) * pageSize; @@ -207,7 +207,7 @@ namespace Aurora::HWInfo auto maxMem = QueryBsdHwStat(cmd); auto vmInfo = GetVMInfo(); - auto freeMem = AuUInt64(vmInfo.t_free) * QueryBsdHwStat(HW_PAGESIZE).value_or(4096); + auto freeMem = AuUInt64(vmInfo.t_free) * AuUInt64(QueryBsdHwStat(HW_PAGESIZE).value_or(4096)); return RamStat {vmInfo.t_rm, maxMem.value_or(freeMem)};