[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    sysmem(3) manual page Table of Contents

Name

sysmem, asysmem - return physical memory information

Synopsis

long sysmem(void);
long asysmem(void);

Description

These routines are obsolete and have been replaced by arguments to sysconf(3C) . They were mistakenly published in the System V Interface Definition, Third Edition, (SVID) and corrected by the Errata: "The following routines were mistakenly include in SVID Edition 3 and were not designed as customer level interfaces: sysmem(AS_LIB), asysmem(AS_LIB) ,... They are therefore removed."

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) .)

Return Values

Upon successful completion, these routines return the amount of memory in bytes; otherwise, they return -1.

See Also

sysconf(3C)

Notes

sysmen() and asysmem() are obsolete and should be replaced with sysconf(3C) .


Table of Contents