1MEM(4) Kernel Interfaces Manual MEM(4)
2
3
4
6 mem, kmem - main memory
7
9 major device number(s):
10 raw: 1
11 minor device encoding:
12 mem: 0; kmem: 1; null: 2
13
15 Mem is a special file that is an image of the main memory of the com‐
16 puter. It may be used, for example, to examine (and even to patch) the
17 system.
18
19 Byte addresses in mem are interpreted as physical memory addresses.
20 References to non-existent locations cause errors to be returned.
21
22 The file kmem is the same as mem except that kernel virtual memory
23 rather than physical memory is accessed. Only kernel virtual addresses
24 that are mapped to memory are allowed. Examining and patching device
25 registers is likely to lead to unexpected results when read-only or
26 write-only bits are present.
27
28 On PDP-11s, the I/O page begins at location 0160000 of kmem and the
29 per-process data segment for the current process begins at 0140000 and
30 is USIZE clicks (64 bytes each) long.
31
33 /dev/mem
34 /dev/kmem
35 /dev/MAKEDEV script to create special files
36 /dev/MAKEDEV.local script to localize special files
37
39 On PDP-11's, specifying an odd kernel or user address, or an odd trans‐
40 fer count is [generally] slower than using all even parameters.
41
42 On machines with ENABLE/34(tm) memory mapping boards the I/O page can
43 be accessed only through kmem.
44
45
46
473rd Berkeley Distribution January 28, 1988 MEM(4)