mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +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: 6b86d8a44d
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;
|
return si.dwNumberOfProcessors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u64 physical_memory_bytes()
|
||||||
|
{
|
||||||
|
MEMORYSTATUSEX ms = {};
|
||||||
|
ms.dwLength = sizeof ms;
|
||||||
|
GlobalMemoryStatusEx(&ms);
|
||||||
|
return ms.ullTotalPhys;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue