Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Each row in <code>/proc/$PID/maps</code> describes a region of contiguous virtual memory in a process or thread. Each row has the following fields:</p> <pre><code>address perms offset dev inode pathname 08048000-08056000 r-xp 00000000 03:0c 64593 /usr/sbin/gpm </code></pre> <ul> <li><strong>address</strong> - This is the starting and ending address of the region in the process's address space</li> <li><strong>permissions</strong> - This describes how pages in the region can be accessed. There are four different permissions: read, write, execute, and shared. If read/write/execute are disabled, a '-' will appear instead of the 'r'/'w'/'x'. If a region is not shared, it is private, so a 'p' will appear instead of an 's'. If the process attempts to access memory in a way that is not permitted, a segmentation fault is generated. Permissions can be changed using the <code>mprotect</code> system call.</li> <li><strong>offset</strong> - If the region was mapped from a file (using <code>mmap</code>), this is the offset in the file where the mapping begins. If the memory was not mapped from a file, it's just 0.</li> <li><strong>device</strong> - If the region was mapped from a file, this is the major and minor device number (in hex) where the file lives.</li> <li><strong>inode</strong> - If the region was mapped from a file, this is the file number.</li> <li><strong>pathname</strong> - If the region was mapped from a file, this is the name of the file. This field is blank for anonymous mapped regions. There are also special regions with names like <code>[heap]</code>, <code>[stack]</code>, or <code>[vdso]</code>. <code>[vdso]</code> stands for virtual dynamic shared object. It's used by system calls to switch to kernel mode. <a href="http://www.trilithium.com/johan/2005/08/linux-gate/" rel="noreferrer">Here's a good article about it.</a></li> </ul> <p>You might notice a lot of anonymous regions. These are usually created by <code>mmap</code> but are not attached to any file. They are used for a lot of miscellaneous things like shared memory or buffers not allocated on the heap. For instance, I think the pthread library uses anonymous mapped regions as stacks for new threads.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload