Hi Nicolas, Nicolas Cavallari wrote,
Do it by following the trail of the existing commented code, which implemented it by calling get_phys_pages() and get_avphys_pages(). This patch implements these two functions, which are also glibc extensions.
Some program/libraries (e.g. libuv) assumes that sysconf(_SC_PHYS_PAGES) works on linux and never check for -1, thus they report an insane amount of memory.
Signed-off-by: Nicolas Cavallari nicolas.cavallari@green-communications.fr
include/sys/sysinfo.h | 2 -- libc/unistd/sysconf.c | 34 ++++++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 10 deletions(-)
Thanks, applied and pushed, Waldemar