[*] force upcast to u64 under ram calc
This commit is contained in:
parent
e30ccbc90f
commit
6a35b68fdc
@ -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)};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user