/dev/mem
,/dev/kmem
和/dev/port
这三个文件分别代表物理内存,kernel
虚拟内存和I/O
端口。参考下面:
/dev/mem is a character device file that is an image of the main memory of the computer. It may be used, for example, to examine (and even patch) the system. Byte addresses in /dev/mem are interpreted as physical memory addresses. References to nonexistent locations cause errors to be returned.
The file /dev/kmem is the same as /dev/mem, except that the kernel virtual memory rather than physical memory is accessed.
/dev/port is similar to /dev/mem, but the I/O ports are accessed.