mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 03:25:13 +00:00
LibCore: Implement System::physical_memory_bytes on Windows
This commit is contained in:
parent
f9e90ca430
commit
6b86d8a44d
Notes:
github-actions[bot]
2025-02-13 01:43:20 +00:00
Author: https://github.com/stasoid Commit: https://github.com/LadybirdBrowser/ladybird/commit/6b86d8a44d7 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3000 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 8 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue