Returns the total number of pages of physical memory on the host machine.
#include <sys/sysinfo.h> long get_phys_pages( void );
Returns the number of pages of physical memory on the host machine. This function cannot fail.
This is a GNU extension and has been included in the library to aid the porting of open source code to NetWare. The standard way to obtain this information is with sysconf (_SC_PHYS_PAGES).
To calculate the amount of memory, you need to multiply the number of pages of physical memory by the page size.