The routine sysmem() determines the total amount of physical memory of the system. It returns a long integer representing the total amount of physical memory, in bytes. Because sysmem() returns a long integer it cannot report the amount of memory for configurations with amounts of memory in bytes greater than the maximum positive value represented by a long integer. sysconf(_SC_PHYS_PAGES) should be used to avoid this limitation. (See sysconf(3C) .)
The routine asysmem() determines the total amount of memory not currently in use on the system. It returns a long integer representing the total amount of available memory, in bytes. Because asysmem() returns a long integer it is limited similar to sysmem(). sysconf(_SC_AVPHYS_PAGES) should be used to avoid this limitation. (See sysconf(3C) .)