Merge pull request #9344 from MerryMage/HW_PHYSMEM64

MemoryUtil: Use HW_PHYSMEM64 sysctl in MemPhysical
This commit is contained in:
LC 2020-12-20 18:53:46 -05:00 committed by GitHub
commit 7c81f0256c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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