mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-15 23:09:05 +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: 9515290fde
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);
|
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)
|
ErrorOr<String> resolve_executable_from_environment(StringView filename, int flags)
|
||||||
{
|
{
|
||||||
if (filename.is_empty())
|
if (filename.is_empty())
|
||||||
|
|
|
@ -283,6 +283,7 @@ ErrorOr<void> posix_fallocate(int fd, off_t offset, off_t length);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned hardware_concurrency();
|
unsigned hardware_concurrency();
|
||||||
|
u64 physical_memory_bytes();
|
||||||
|
|
||||||
ErrorOr<String> resolve_executable_from_environment(StringView filename, int flags = 0);
|
ErrorOr<String> resolve_executable_from_environment(StringView filename, int flags = 0);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue