.TH mem "" "" "Device Driver"
.PC "Physical memory file"
.PP
.II /dev/mem
.II "memory manager"
.II "kernel^memory manager"
.II "driver^memory manager"
.II "device driver^memory manager"
The special file
.B /dev/mem
permits a program to read and write to the physical memory of the
host computer, just as it reads and writes into an ordinary file.
The location where I/O will occur can be positioned to any valid byte address
by a call to
.BR lseek() .
Note that
.B ps
and related commands use
.BR /dev/kmem ,
which manipulates the kernel's data space.
.PP
Commands may examine or change addresses in physical memory.
Addresses to use when changing the system itself
normally are obtained from the system load module
(\fB/coherent\fR)
name list,
so that they always reflect the currently running
version of the system.
.SH Files
.B /dev/mem
.SH "See Also"
.Xr "clock," clock
.Xr "cmos," cmos
.Xr "core," core
.Xr "device drivers," device_dr
.Xr "lseek," lseek
.Xr "ps" ps
.SH Diagnostics
On an error, such as nonexistent memory location,
.B mem
returns \-1.
