2 .\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
3 .\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
6 .\" SPDX-License-Identifier: GPL-3.0-or-later
8 .TH proc_pid_smaps 5 (date) "Linux man-pages (unreleased)"
10 /proc/pid/smaps \- XXX: What does 's' in "smaps" stand for?
13 .IR /proc/ pid /smaps " (since Linux 2.6.14)"
14 This file shows memory consumption for each of the process's mappings.
17 command displays similar information,
18 in a form that may be easier for parsing.)
19 For each mapping there is a series of lines such as the following:
23 00400000\-0048a000 r\-xp 00000000 fd:03 960637 /bin/bash
41 VmFlags: rd ex mr mw me dw
45 The first of these lines shows the same information as is displayed
47 .IR /proc/ pid /maps .
48 The following lines show the size of the mapping,
49 the amount of the mapping that is currently resident in RAM ("Rss"),
50 the process's proportional share of this mapping ("Pss"),
51 the number of clean and dirty shared pages in the mapping,
52 and the number of clean and dirty private pages in the mapping.
53 "Referenced" indicates the amount of memory currently marked as
54 referenced or accessed.
55 "Anonymous" shows the amount of memory
56 that does not belong to any file.
58 would-be-anonymous memory is also used, but out on swap.
60 The "KernelPageSize" line (available since Linux 2.6.29)
61 is the page size used by the kernel to back the virtual memory area.
62 This matches the size used by the MMU in the majority of cases.
63 However, one counter-example occurs on PPC64 kernels
64 whereby a kernel using 64 kB as a base page size may still use 4 kB
65 pages for the MMU on older processors.
66 To distinguish the two attributes, the "MMUPageSize" line
67 (also available since Linux 2.6.29)
68 reports the page size used by the MMU.
70 The "Locked" indicates whether the mapping is locked in memory
73 The "ProtectionKey" line (available since Linux 4.9, on x86 only)
74 contains the memory protection key (see
76 associated with the virtual memory area.
77 This entry is present only if the kernel was built with the
78 .B CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS
79 configuration option (since Linux 4.6).
81 The "VmFlags" line (available since Linux 3.8)
82 represents the kernel flags associated with the virtual memory area,
83 encoded using the following two-letter codes:
96 gd - stack segment grows down
98 dw - disabled write to the mapped file
99 lo - pages are locked in memory
100 io - memory mapped I/O area
101 sr - sequential read advise provided
102 rr - random read advise provided
103 dc - do not copy area on fork
104 de - do not expand area on remapping
105 ac - area is accountable
106 nr - swap space is not reserved for the area
107 ht - area uses huge tlb pages
108 sf - perform synchronous page faults (since Linux 4.15)
109 nl - non-linear mapping (removed in Linux 4.0)
110 ar - architecture specific flag
111 wf - wipe on fork (since Linux 4.14)
112 dd - do not include area into core dump
113 sd - soft-dirty flag (since Linux 3.13)
115 hg - huge page advise flag
116 nh - no-huge page advise flag
117 mg - mergeable advise flag
118 um - userfaultfd missing pages tracking (since Linux 4.3)
119 uw - userfaultfd wprotect pages tracking (since Linux 4.3)
124 .IR /proc/ pid /smaps
125 file is present only if the
126 .B CONFIG_PROC_PAGE_MONITOR
127 kernel configuration option is enabled.