determining size of physical memory

Chris Torek chris at mimsy.umd.edu
Mon Jan 7 06:38:08 AEST 1991


>In article <7325 at plains.NoDak.edu>
(which, for some reason, is not included in the references line; apparently
the news software at mrsvr is broken)
>bakke at plains.NoDak.edu (Jeffrey P. Bakke) writes:
>>'wc -c < /dev/mem' [will often produce the answer]

In article <3318 at mrsvr.UUCP> kohli at gemed (Jim Kohli) writes:
>While in theory this should work, there seems
>to be a problem with SunOS 4.01-- the /dev/mem
>driver gives you an early EOF indicating fewer
>bytes than there really are.

This is not a bug.  /dev/mem gives access to physical bus addresses.
The physical addresses of the memory in Sun 4s are not always
contiguous.  (That is why you can mix different capacity SIMMs on
these.) Note that on some machines physical memory does not start at
address 0; on these also straightforward reading of /dev/mem with `wc'
or `dd' will not work.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list