Detailed mapping information of each page in your process can be found in this file.
While the pmap file gives you a summary of your
process's memory mappings, the mappings file includes details of each page mapping.
The content of the file is large and we recommend you write
a script to analyze the file and extract information that you need.
This file can be found under
/proc/pid/mappings,
where
pid is the process ID.
Below is a brief description of the parameters found in
mappings:
- mi_vaddr
- Virtual address that aligns to hardware requirements.
- ri_flags
- Mapped memory flags.
See mmap() for details on the flags.
- mi_flags
- Mapping flags of the hardware.
- mi_pte_prot
- Mapping protection bits of the hardware, right shifted by 8 bits.
See mmap() for details on the flags.
- mi_prot
- Mapping protection bits of the region, right shifted by 8 bits.
See mmap() for details on the flags.
- ri_prot
- Enforced region mapping protection, right shifted by 8 bits.
See mmap() for details on the flags.
- ri_maxprot
- Allowed region mapping protection, right shifted by 8 bits.
- mi_paddr
- Physical address of this mapping.
- mi_hwattr
- Hardware access and permission bits.
- mi_pgsize
- Hardware page size of the mapping.
- mi_sharecnt
- Number of mappings referencing this page.
- dev
- Device ID of mapped objects.
- ino
- Inode of mapped objects.
- ri_offset
- The offset from the start of the mapped object.
- object_name
- The object type or name.