LibCore: Implement System::physical_memory_bytes on Windows

This commit is contained in:
stasoid 2024-12-21 11:44:55 +05:00 committed by Andrew Kaster
parent f9e90ca430
commit 6b86d8a44d

View File

@ -239,4 +239,12 @@ unsigned hardware_concurrency()
return si.dwNumberOfProcessors;
}
u64 physical_memory_bytes()
{
MEMORYSTATUSEX ms = {};
ms.dwLength = sizeof ms;
GlobalMemoryStatusEx(&ms);
return ms.ullTotalPhys;
}
}