diff --git a/Kernel/API/POSIX/unistd.h b/Kernel/API/POSIX/unistd.h index 5c8bec1e2ff..523d7b83e2f 100644 --- a/Kernel/API/POSIX/unistd.h +++ b/Kernel/API/POSIX/unistd.h @@ -45,6 +45,7 @@ enum { _SC_MAPPED_FILES, _SC_ARG_MAX, _SC_IOV_MAX, + _SC_PHYS_PAGES, }; #define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK @@ -60,6 +61,7 @@ enum { #define _SC_MAPPED_FILES _SC_MAPPED_FILES #define _SC_ARG_MAX _SC_ARG_MAX #define _SC_IOV_MAX _SC_IOV_MAX +#define _SC_PHYS_PAGES _SC_PHYS_PAGES #ifdef __cplusplus } diff --git a/Kernel/Syscalls/sysconf.cpp b/Kernel/Syscalls/sysconf.cpp index 0f471460ef1..d86511342de 100644 --- a/Kernel/Syscalls/sysconf.cpp +++ b/Kernel/Syscalls/sysconf.cpp @@ -5,6 +5,7 @@ */ #include +#include #include #include @@ -37,6 +38,8 @@ ErrorOr Process::sys$sysconf(int name) return Process::max_arguments_size; case _SC_IOV_MAX: return IOV_MAX; + case _SC_PHYS_PAGES: + return MM.get_system_memory_info().physical_pages; default: return EINVAL; }