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_pagemap 5 (date) "Linux man-pages (unreleased)"
9 /proc/pid/pagemap \- mapping of virtual pages
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:
20 If set, the page is present in RAM.
23 If set, the page is in swap space
26 The page is a file-mapped page or a shared anonymous page.
28 60\[en]58 (since Linux 3.11)
30 .\" Not quite true; see commit 541c237c0923f567c9c4cabb8a81635baadc713f
33 If set, the page is write-protected through
37 .\" commit 77bb499bb60f4b79cca7d139c8041662860fcf87
38 .\" commit 83b4b0bb635eee2b8e075062e4e008d1bc110ed7
39 The page is exclusively mapped.
43 (see the kernel source file
44 .IR Documentation/admin\-guide/mm/soft\-dirty.rst ).
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
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.
56 Before Linux 3.11, bits 60\[en]55 were
57 used to encode the base-2 log of the page size.
60 .IR /proc/ pid /pagemap
63 to determine which areas of memory are actually mapped and seek
64 to skip over unmapped regions.
67 .IR /proc/ pid /pagemap
68 file is present only if the
69 .B CONFIG_PROC_PAGE_MONITOR
70 kernel configuration option is enabled.
72 Permission to access this file is governed by a ptrace access mode
73 .B PTRACE_MODE_READ_FSCREDS