From 7f3caba522f4d24764f29d83aa2de9198bb7f01c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 24 May 2024 06:52:22 +0200 Subject: Adding upstream version 6.8. Signed-off-by: Daniel Baumann --- man3/get_phys_pages.3 | 90 --------------------------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 man3/get_phys_pages.3 (limited to 'man3/get_phys_pages.3') diff --git a/man3/get_phys_pages.3 b/man3/get_phys_pages.3 deleted file mode 100644 index 714e397..0000000 --- a/man3/get_phys_pages.3 +++ /dev/null @@ -1,90 +0,0 @@ -.\" Copyright (c) 2015 William Woodruff (william@tuffbizz.com) -.\" -.\" SPDX-License-Identifier: Linux-man-pages-copyleft -.\" -.TH get_phys_pages 3 2023-10-31 "Linux man-pages 6.7" -.SH NAME -get_phys_pages, get_avphys_pages \- get total and available physical -page counts -.SH LIBRARY -Standard C library -.RI ( libc ", " \-lc ) -.SH SYNOPSIS -.nf -.B "#include " -.P -.B long get_phys_pages(void); -.B long get_avphys_pages(void); -.fi -.SH DESCRIPTION -The function -.BR get_phys_pages () -returns the total number of physical pages of memory available on the system. -.P -The function -.BR get_avphys_pages () -returns the number of currently available physical pages of memory on the -system. -.SH RETURN VALUE -On success, -these functions return a nonnegative value as given in DESCRIPTION. -On failure, they return \-1 and set -.I errno -to indicate the error. -.SH ERRORS -.TP -.B ENOSYS -The system could not provide the required information -(possibly because the -.I /proc -filesystem was not mounted). -.SH STANDARDS -GNU. -.SH HISTORY -Before glibc 2.23, -these functions obtained the required information by scanning the -.I MemTotal -and -.I MemFree -fields of -.IR /proc/meminfo . -Since glibc 2.23, -these functions obtain the required information by calling -.BR sysinfo (2). -.SH NOTES -The following -.BR sysconf (3) -calls provide a portable means of obtaining the same information as the -functions described on this page. -.P -.in +4n -.EX -total_pages = sysconf(_SC_PHYS_PAGES); /* total pages */ -avl_pages = sysconf(_SC_AVPHYS_PAGES); /* available pages */ -.EE -.in -.SH EXAMPLES -The following example shows how -.BR get_phys_pages () -and -.BR get_avphys_pages () -can be used. -.P -.\" SRC BEGIN (get_phys_pages.c) -.EX -#include -#include -#include -\& -int -main(void) -{ - printf("This system has %ld pages of physical memory and " - "%ld pages of physical memory available.\en", - get_phys_pages(), get_avphys_pages()); - exit(EXIT_SUCCESS); -} -.EE -.\" SRC END -.SH SEE ALSO -.BR sysconf (3) -- cgit v1.2.3