| 1 |
.\" Copyright 1994-1995, Daniel Quinlan <[email protected]> |
| 2 |
.\" Copyright 2002-2017, Michael Kerrisk <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: GPL-3.0-or-later |
| 6 |
.\" |
| 7 |
.TH proc_pid_pagemap 5 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
/proc/pid/pagemap \- mapping of virtual pages |
| 10 |
.SH DESCRIPTION |
| 11 |
.TP |
| 12 |
.IR /proc/ pid /pagemap " (since Linux 2.6.25)" |
| 13 |
This file shows the mapping of each of the process's virtual pages |
| 14 |
into physical page frames or swap area. |
| 15 |
It contains one 64-bit value for each virtual page, |
| 16 |
with the bits set as follows: |
| 17 |
.RS |
| 18 |
.TP |
| 19 |
63 |
| 20 |
If set, the page is present in RAM. |
| 21 |
.TP |
| 22 |
62 |
| 23 |
If set, the page is in swap space |
| 24 |
.TP |
| 25 |
61 (since Linux 3.5) |
| 26 |
The page is a file-mapped page or a shared anonymous page. |
| 27 |
.TP |
| 28 |
60\[en]58 (since Linux 3.11) |
| 29 |
Zero |
| 30 |
.\" Not quite true; see commit 541c237c0923f567c9c4cabb8a81635baadc713f |
| 31 |
.TP |
| 32 |
57 (since Linux 5.14) |
| 33 |
If set, the page is write-protected through |
| 34 |
.BR userfaultfd (2). |
| 35 |
.TP |
| 36 |
56 (since Linux 4.2) |
| 37 |
.\" commit 77bb499bb60f4b79cca7d139c8041662860fcf87 |
| 38 |
.\" commit 83b4b0bb635eee2b8e075062e4e008d1bc110ed7 |
| 39 |
The page is exclusively mapped. |
| 40 |
.TP |
| 41 |
55 (since Linux 3.11) |
| 42 |
PTE is soft-dirty |
| 43 |
(see the kernel source file |
| 44 |
.IR Documentation/admin\-guide/mm/soft\-dirty.rst ). |
| 45 |
.TP |
| 46 |
54\[en]0 |
| 47 |
If the page is present in RAM (bit 63), then these bits |
| 48 |
provide the page frame number, which can be used to index |
| 49 |
.I /proc/kpageflags |
| 50 |
and |
| 51 |
.IR /proc/kpagecount . |
| 52 |
If the page is present in swap (bit 62), |
| 53 |
then bits 4\[en]0 give the swap type, and bits 54\[en]5 encode the swap offset. |
| 54 |
.RE |
| 55 |
.IP |
| 56 |
Before Linux 3.11, bits 60\[en]55 were |
| 57 |
used to encode the base-2 log of the page size. |
| 58 |
.IP |
| 59 |
To employ |
| 60 |
.IR /proc/ pid /pagemap |
| 61 |
efficiently, use |
| 62 |
.IR /proc/ pid /maps |
| 63 |
to determine which areas of memory are actually mapped and seek |
| 64 |
to skip over unmapped regions. |
| 65 |
.IP |
| 66 |
The |
| 67 |
.IR /proc/ pid /pagemap |
| 68 |
file is present only if the |
| 69 |
.B CONFIG_PROC_PAGE_MONITOR |
| 70 |
kernel configuration option is enabled. |
| 71 |
.IP |
| 72 |
Permission to access this file is governed by a ptrace access mode |
| 73 |
.B PTRACE_MODE_READ_FSCREDS |
| 74 |
check; |
| 75 |
see |
| 76 |
.BR ptrace (2). |
| 77 |
.SH SEE ALSO |
| 78 |
.BR proc (5) |