MEM(4) UNIX Programmer's Manual MEM(4) NAME mem, kmem - main memory DESCRIPTION _M_e_m is a special file that is an image of the main memory of the computer. It may be used, for example, to examine, and even to patch the system. _K_m_e_m is the same as _m_e_m except that kernel virtual memory rather than physical memory is accessed. _K_m_e_m is faster than _m_e_m when the address, count, and base are all even. References to nonexistent locations return errors. Examining and patching device registers is likely to lead to unexpected results when read-only or write-only bits are present. On PDP-11s, the I/O page begins at location 0160000 of _k_m_e_m and the per-process data segment for the current process begins at 0140000. FILES /dev/mem /dev/kmem BUGS On PDP-11's, memory files are accessed one byte at a time, an inapproriate method for some device registers. On machines with ENABLE/34(tm) memory mapping boards the I/O page can be accessed only through _k_m_e_m. Printed 7/31/83 1