how is memory configured?

Ken Smith kensmith at cs.buffalo.edu
Tue Mar 13 07:46:14 AEST 1990


In article <5511 at brazos.Rice.edu>, david at wubios.wustl.edu (David J. Camp)
writes:
> We were led to believe that we had 16MB of ram in our Sun 3/260.  However,
> the 'top' program reports that we only have 5-6MB.  Either top is broken,
> top is reporting something other than real memory, we have not properly
> configured the memory on our computer, or we do not really have the 16MB
> we thought we have.
> 
> Can anyone suggest:
>     1)  How can we determine how much memory is installed?

The easiest approach is to check the 'mem = ...' messages when the machine
boots.  These messages are also stored in /var/adm/messages* (may be
several files...).  If your machine has been up a long time then the
messages files probably won't have a record of a boot.  Below is a short
program that seems to work on straight BSD systems, a couple BSD
derivatives, and all the SunOS's I've tried (4.0 through 4.1BETA).

>     2)  How is SunOS told how much memory to use?

It figures it out on its own by trying to access memory pages.  There are
eeprom settings related to memory but that tells the ROM monitor routines
how much memory to test when the machine is reset, before attempting to
boot the operating system.  As far as I can tell the values kept in eeprom
are completely ignored by the kernel.

>     3)  What is top reporting?

I don't have a copy of top handy but I'd guess it's either showing you how
much memory is in use or how much is not in use at the time.  Related
programs are vmstat and pstat.

>     4)  How can we make sure we are using the full 16MB?

If SunOS knows it's there then it will use it...

						Ken Smith

internet:	kensmith at cs.buffalo.edu
bitnet:		kensmith%cs.buffalo.edu at ubvm.bitnet

[[Note: Memory routine placed in archives. -bdg]]

FTP: 	Hostname : titan.rice.edu (128.42.1.30)
	Directory: sun-source
	Filename : mem.c

Archive Server Address: archive-server at rice.edu
Archive Server Command: send sun-source mem.c



More information about the Comp.sys.sun mailing list