MemoryUtil: Use HW_PHYSMEM64 sysctl in MemPhysical

HW_PHYSMEM is deprecated on OpenBSD and only supplies a 32-bit value on NetBSD
This commit is contained in:
MerryMage 2020-12-20 22:25:36 +00:00
parent c582fb098d
commit 29fceeb37f
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ size_t MemPhysical()
#elif defined __FreeBSD__
mib[1] = HW_REALMEM;
#elif defined __OpenBSD__ || defined __NetBSD__
mib[1] = HW_PHYSMEM;
mib[1] = HW_PHYSMEM64;
#endif
size_t length = sizeof(size_t);
sysctl(mib, 2, &physical_memory, &length, NULL, 0);