mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibCore: Add System::physical_memory_bytes()
This commit is contained in:
parent
274411db97
commit
9515290fde
Notes:
github-actions[bot]
2024-10-08 17:03:38 +00:00
Author: https://github.com/gmta Commit: https://github.com/LadybirdBrowser/ladybird/commit/9515290fde3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1681
2 changed files with 6 additions and 0 deletions
|
@ -1751,6 +1751,11 @@ unsigned hardware_concurrency()
|
|||
return sysconf(_SC_NPROCESSORS_ONLN);
|
||||
}
|
||||
|
||||
u64 physical_memory_bytes()
|
||||
{
|
||||
return sysconf(_SC_PHYS_PAGES) * PAGE_SIZE;
|
||||
}
|
||||
|
||||
ErrorOr<String> resolve_executable_from_environment(StringView filename, int flags)
|
||||
{
|
||||
if (filename.is_empty())
|
||||
|
|
|
@ -283,6 +283,7 @@ ErrorOr<void> posix_fallocate(int fd, off_t offset, off_t length);
|
|||
#endif
|
||||
|
||||
unsigned hardware_concurrency();
|
||||
u64 physical_memory_bytes();
|
||||
|
||||
ErrorOr<String> resolve_executable_from_environment(StringView filename, int flags = 0);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue