1 .\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
2 .\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
5 .\" SPDX-License-Identifier: GPL-3.0-or-later
7 .TH proc_pid_maps 5 (date) "Linux man-pages (unreleased)"
9 /proc/pid/maps \- mapped memory regions
13 A file containing the currently mapped memory regions and their access
17 for some further information about memory mappings.
19 Permission to access this file is governed by a ptrace access mode
20 .B PTRACE_MODE_READ_FSCREDS
24 The format of the file is:
28 .I "address perms offset dev inode pathname"
29 00400000\-00452000 r\-xp 00000000 08:02 173521 /usr/bin/dbus\-daemon
30 00651000\-00652000 r\-\-p 00051000 08:02 173521 /usr/bin/dbus\-daemon
31 00652000\-00655000 rw\-p 00052000 08:02 173521 /usr/bin/dbus\-daemon
32 00e03000\-00e24000 rw\-p 00000000 00:00 0 [heap]
33 00e24000\-011f7000 rw\-p 00000000 00:00 0 [heap]
35 35b1800000\-35b1820000 r\-xp 00000000 08:02 135522 /usr/lib64/ld\-2.15.so
36 35b1a1f000\-35b1a20000 r\-\-p 0001f000 08:02 135522 /usr/lib64/ld\-2.15.so
37 35b1a20000\-35b1a21000 rw\-p 00020000 08:02 135522 /usr/lib64/ld\-2.15.so
38 35b1a21000\-35b1a22000 rw\-p 00000000 00:00 0
39 35b1c00000\-35b1dac000 r\-xp 00000000 08:02 135870 /usr/lib64/libc\-2.15.so
40 35b1dac000\-35b1fac000 \-\-\-p 001ac000 08:02 135870 /usr/lib64/libc\-2.15.so
41 35b1fac000\-35b1fb0000 r\-\-p 001ac000 08:02 135870 /usr/lib64/libc\-2.15.so
42 35b1fb0000\-35b1fb2000 rw\-p 001b0000 08:02 135870 /usr/lib64/libc\-2.15.so
44 f2c6ff8c000\-7f2c7078c000 rw\-p 00000000 00:00 0 [stack:986]
46 7fffb2c0d000\-7fffb2c2e000 rw\-p 00000000 00:00 0 [stack]
47 7fffb2d48000\-7fffb2d49000 r\-xp 00000000 00:00 0 [vdso]
53 field is the address space in the process that the mapping occupies.
56 field is a set of permissions:
64 p = private (copy on write)
70 field is the offset into the file/whatever;
75 is the inode on that device.
76 0 indicates that no inode is associated with the memory region,
77 as would be the case with BSS (uninitialized data).
81 field will usually be the file that is backing the mapping.
83 you can easily coordinate with the
85 field by looking at the
86 Offset field in the ELF program headers
87 .RI ( "readelf\ \-l" ).
89 There are additional helpful pseudo-paths:
93 The initial process's (also known as the main thread's) stack.
95 .IR [stack: tid ] " (from Linux 3.4 to Linux 4.4)"
96 .\" commit b76437579d1344b612cf1851ae610c636cec7db0 (added)
97 .\" commit 65376df582174ffcec9e6471bf5b0dd79ba05e4a (removed)
98 A thread's stack (where the
101 It corresponds to the
102 .IR /proc/ pid /task/ tid /
104 This field was removed in Linux 4.5, since providing this information
105 for a process with large numbers of threads is expensive.
108 The virtual dynamically linked shared object.
115 .IR [anon: name ] " (since Linux 5.17)"
116 .\" Commit 9a10064f5625d5572c3626c1516e0bebc6c9fe9b
117 A named private anonymous mapping.
120 .BR PR_SET_VMA_ANON_NAME .
122 .IR [anon_shmem: name ] " (since Linux 6.2)"
123 .\" Commit d09e8ca6cb93bb4b97517a18fbbf7eccb0e9ff43
124 A named shared anonymous mapping.
127 .BR PR_SET_VMA_ANON_NAME .
134 this is an anonymous mapping as obtained via
136 There is no easy way to coordinate this back to a process's source,
137 short of running it through
143 is shown unescaped except for newline characters, which are replaced
144 with an octal escape sequence.
145 As a result, it is not possible to determine whether the original
146 pathname contained a newline character or the literal
150 If the mapping is file-backed and the file has been deleted, the string
151 " (deleted)" is appended to the pathname.
152 Note that this is ambiguous too.
154 Under Linux 2.0, there is no field giving pathname.