Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sysconf(3C)

sysmem(3)

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

SunOS 5.5/SPARC  —  Last change: 15 Aug 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026