mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibCore: Add System::physical_memory_bytes()
This commit is contained in:
committed by
Andreas Kling
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user