mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibCore: Implement System::physical_memory_bytes on Windows
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user