mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibCore: Add System::physical_memory_bytes()
This commit is contained in:
parent
274411db97
commit
9515290fde
|
|
@ -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…
Reference in New Issue
Block a user