mem" -- Device Driver" "

Physical memory file

The special file /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 lseek(). Note that ps and related commands use /dev/kmem, which manipulates the kernel's data space.

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 (//ccoohheerreenntt) name list, so that they always reflect the currently running version of the system.

Files

/dev/mem

See Also

Diagnostics

On an error, such as nonexistent memory location, mem returns -1.