[*] force upcast to u64 under ram calc

This commit is contained in:
Reece Wilson 2022-01-20 19:23:37 +00:00
parent e30ccbc90f
commit 6a35b68fdc

View File

@ -157,7 +157,7 @@ namespace Aurora::HWInfo
#elif defined(AURORA_IS_BSD_DERIVED)
auto vmInfo = GetVMInfo();
auto pageSize = QueryBsdHwStat<unsigned int>(HW_PAGESIZE).value_or(4096);
auto pageSize = AuUInt64(QueryBsdHwStat<unsigned int>(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<decltype(stat)>(cmd);
auto vmInfo = GetVMInfo();
auto freeMem = AuUInt64(vmInfo.t_free) * QueryBsdHwStat<unsigned int>(HW_PAGESIZE).value_or(4096);
auto freeMem = AuUInt64(vmInfo.t_free) * AuUInt64(QueryBsdHwStat<unsigned int>(HW_PAGESIZE).value_or(4096));
return RamStat {vmInfo.t_rm, maxMem.value_or(freeMem)};