Home > Articles

  • Print
  • + Share This
Like this article? We recommend

pmap(1)

NAME
   pmap - display information about the address space of a pro-
   cess

SYNOPSIS
   /usr/bin/pmap [-rslF] [pid | core] ...

   /usr/bin/pmap -x [-aslF] [pid | core] ...

   /usr/bin/pmap -S [-alF] [pid | core] ...

DESCRIPTION
   The pmap utility prints information about the address space
   of a process.

OPTIONS
   The following options are supported:

   -a  Prints anonymous and swap reservations for shared mappings.

   -F  Force. Grabs the target process even if another pro-
      cess has control.

   -l  Shows unresolved dynamic linker map names.

   -r  Prints the process's reserved addresses.

   -s  Prints HAT page size information.

USAGE
   The pmap utility prints information about the address space
   of a process.

   Process Mappings

      /usr/bin/pmap [ -rslF ] [ pid | core ] ...

      By default, pmap displays the mappings in the virtual
      address order they are mapped into the process. The
      mapping size, flags and mapped object name are shown.


Process anon/locked mapping details

      /usr/bin/pmap -x [ -aslF ] [ pid | core ] ...

      The -x option displays additional information per map-
      ping. The size of each mapping, the amount of resident
      physical memory, the amount of anonymous memory, and
      the amount of memory locked is shown with this option.
      This does not include anonymous memory taken by kernel
      address space due to this process.
Swap Reservations

      /usr/bin/pmap -S [ -alF ] [ pid | core ] ...
      The -S option displays swap reservation information
      per mapping.

DISPLAY FORMATS
   One line of output is printed for each mapping within the
   process, unless the -s option is specified, where one line
   is printed for a contiguous mapping of each hardware trans-
   lation  page  size. The column headings are shown in
   parentheses below.

   Virtual Address (Address)
      The first column of output represents the starting
      virtual address of each mapping. Virtual addresses are
      displayed in ascending order.

   Virtual Mapping Size (Kbytes)
      The virtual size in kilobytes of each mapping.

   Resident Physical Memory (RSS)
      The amount of physical memory in kilobytes that is
      resident for each mapping, including that which is
      shared with other address spaces.

   Anonymous Memory (Anon)
      The number of pages, counted by using the system page
      size, of anonymous memory associated with the speci-
      fied mapping. Anonymous memory shared with other
      address spaces is not included, unless the -a option
      is specified.

      Anonymous memory is reported for the process heap,
      stack, for 'copy on write' pages with mappings mapped
      with MAP_PRIVATE (see mmap(2)).


Locked (Locked)
      The number of pages locked within the mapping. Typical
      examples are memory locked with mlock() and System V
      shared memory created with SHM_SHARE_MMU.

   Permissions/Flags (Mode)
      The virtual memory permissions are shown for each map-
      ping. Valid permissions are:

      r:  The mapping may be read by the process.
      w:  The mapping may be written by the process.

User Commands                       pmap(1)

      x:  Instructions that reside within the mapping may
         be executed by the process.

      Flags showing additional information for each mapping
      may be displayed:

      s:  The mapping is shared such that changes made in
         the observed address space are committed to the
         mapped file, and are visible from all other
         processes sharing the mapping.

      R:  Swap space is not reserved for this mapping.
         Mappings created with MAP_NORESERVE and System V
         ISM shared memory mappings do not reserve swap
         space.

   Mapping Name (Mapped File)
      A descriptive name for each mapping. The following
      major types of names are displayed for mappings:

       +o A mapped file: For mappings between a process
         and a file, the pmap command attempts to resolve
         the file name for each mapping. If the file name
         cannot be resolved, pmap displays the major and
         minor number of the device containing the file,
         and the file system inode number of the file.

       +o Anonymous memory: Memory not relating to any
         named object or file within the file system is
         reported as [ anon ].



         The pmap command displays common names for cer-
         tain known anonymous memory mappings, such as:


         [ heap ]
            The process heap.

         [ stack ]
            The process stack.


         If the common name for the mapping is unknown,
         pmap displays [ anon ] as the mapping name.

       +o System V Shared Memory: Mappings created using
         System V shared memory system calls are reported
         with the names shown below:

         shmid=n:
            The mapping is a System V shared memory
            mapping. The shared memory identifier that
            the mapping was created with is reported.

         ism shmid=n:
            The mapping is an "Intimate Shared Memory"
            variant of System V shared memory. ISM
            mappings  are  created  with   the
            SHM_SHARE_MMU flag set, in accordance with
            shmat(2) (see shmop(2)).

         dism shmid=n:
            The mapping is a pageable variant of ISM.
            Pageable  ISM  is  created  with  the
            SHM_PAGEABLE flag set in accordance with
            shmat(2) (see shmop(2)).


       +o Other: Mappings of other objects, including dev-
         ices such as frame buffers. No mapping name is
         shown for other mapped objects.

Page Size (Pgsz)
      The page size in kilobytes that is used for hardware
      address translation for this mapping. See memcntl(2)
      for further information.


   Swap Space (Swap)
      The amount of swap space in kilobytes that is reserved
      for this mapping. That is, swap space that is deducted
      from the total available pool of reservable swap space
      that is displayed with the command swap -s. See
      swap(1M).

EXAMPLES
   Example 1: Displaying process mappings

   By default, pmap prints one line for each mapping within the
   address space of the target process. The following example
   displays the address space of a typical bourne shell:

     example$ pmap 102905
     102905:  sh
     00010000  192K r-x-- /usr/bin/ksh
     00040000   8K rwx-- /usr/bin/ksh
     00042000   40K rwx--  [ heap ]
     FF180000  664K r-x-- /usr/lib/libc.so.1
     FF236000   24K rwx-- /usr/lib/libc.so.1
     FF23C000   8K rwx-- /usr/lib/libc.so.1
     FF250000   8K rwx--  [ anon ]
     FF260000   16K r-x-- /usr/lib/en_US.ISO8859-1.so.2
     FF272000   16K rwx-- /usr/lib/en_US.ISO8859-1.so.2
     FF280000  560K r-x-- /usr/lib/libnsl.so.1
     FF31C000   32K rwx-- /usr/lib/libnsl.so.1
     FF324000   32K rwx-- /usr/lib/libnsl.so.1
     FF340000   16K r-x-- /usr/lib/libc_psr.so.1
     FF350000   16K r-x-- /usr/lib/libmp.so.2
     FF364000   8K rwx-- /usr/lib/libmp.so.2
     FF380000   40K r-x-- /usr/lib/libsocket.so.1
     FF39A000   8K rwx-- /usr/lib/libsocket.so.1
     FF3A0000   8K r-x-- /usr/lib/libdl.so.1
     FF3B0000   8K rwx--  [ anon ]
     FF3C0000  152K r-x-- /usr/lib/ld.so.1
     FF3F6000   8K rwx-- /usr/lib/ld.so.1
     FFBFC000   16K rw---  [ stack ]
      total   1880K

Example 2: Displaying memory allocation and mapping types

   The -x option can be used to provide information about the
   memory allocation and mapping types per mapping. The amount
   of resident, non-shared anonymous, and locked memory is
   shown for each mapping:


example$ pmap -x 102908
102908:  sh
Address  Kbytes   RSS  Anon Locked Mode  Mapped File
00010000   88   88    -    - r-x-- sh
00036000    8    8    8    - rwx-- sh
00038000   16   16   16    - rwx--  [ heap ]
FF260000   16   16    -    - r-x-- en_US.ISO8859-1.so.2
FF272000   16   16    -    - rwx-- en_US.ISO8859-1.so.2
FF280000   664   624    -    - r-x-- libc.so.1
FF336000   32   32    8    - rwx-- libc.so.1
FF360000   16   16    -    - r-x-- libc_psr.so.1
FF380000   24   24    -    - r-x-- libgen.so.1
FF396000    8    8    -    - rwx-- libgen.so.1
FF3A0000    8    8    -    - r-x-- libdl.so.1
FF3B0000    8    8    8    - rwx-- [ anon ]
FF3C0000   152   152    -    - r-x-- ld.so.1
FF3F6000    8    8    8    - rwx-- ld.so.1
FFBFE000    8    8    8    - rw--- [ stack ]
--------  -----  -----  -----  ------
total Kb  1072  1032   56    -

The amount of incremental memory used by each additional
   instance of a process can be estimated by using the resident
   and anonymous memory counts of each mapping.

   In the above example, the bourne shell has a resident memory
   size of 1032Kbytes. However, a large amount of the physical
   memory used by the shell is shared with other instances of
   shell. Another identical instance of the shell will share
   physical memory with the other shell where possible, and
   allocate anonymous memory for any non-shared portion. In the
   above  example,  each  additional  bourne  shell  uses
   approximately 56Kbytes of additional physical memory.

   A more complex example shows the output format for a process
   containing different mapping types. In this example, the
   mappings are as follows:

       0001000: Executable text, mapped from 'maps' program

       0002000: Executable data, mapped from 'maps' program

       0002200: Program heap

       0300000: A mapped file, mapped MAP_SHARED
       0400000: A mapped file, mapped MAP_PRIVATE

       0500000: A mapped file, mapped MAP_PRIVATE | MAP_NORESERVE

    0600000: Anonymous memory, created by mapping /dev/zero

    0700000: Anonymous memory, created by mapping /dev/zero
         with MAP_NORESERVE

    0800000: A DISM shared memory mapping created with SHM_PAGEABLE
         with 8MB locked via mlock(2)

    0900000: A DISM shared memory mapping created with SHM_PAGEABLE
         with 4MB of its pages touched.

    0A00000: A DISM shared memory mapping created with SHM_PAGEABLE
         with none of its pages touched.

    0B00000: A ISM shared memory mapping created with SHM_SHARE_MMU

    example$ pmap -xs 15492
    15492: ./maps
    Address Kbytes   RSS  Anon Locked Mode  Mapped File
    00010000    8    8    -    - r-x-- maps
    00020000    8    8    8    - rwx-- maps
    00022000  20344  16248  16248    - rwx--  [ heap ]
    03000000  1024  1024    -    - rw-s- dev:0,2 ino:4628487
    04000000  1024  1024   512    - rw--- dev:0,2 ino:4628487
    05000000  1024  1024   512    - rw--R dev:0,2 ino:4628487
    06000000  1024  1024  1024    - rw---  [ anon ]
    07000000   512   512   512    - rw--R [ anon ]
    08000000  8192  8192    -  8192 rwxs-  [ dism shmid=0x5]
    09000000  8192  4096    -    - rwxs-  [ dism shmid=0x4]
    0A000000  8192  8192    -  8192 rwxsR  [ ism shmid=0x2 ]
    0B000000  8192  8192    -  8192 rwxsR  [ ism shmid=0x3 ]
    FF280000   680   672    -    - r-x-- libc.so.1
    FF33A000   32   32   32    - rwx-- libc.so.1
    FF390000    8    8    -    - r-x-- libc_psr.so.1
    FF3A0000    8    8    -    - r-x-- libdl.so.1
    FF3B0000    8    8    8    - rwx--  [ anon ]
    FF3C0000   152   152    -    - r-x-- ld.so.1
    FF3F6000    8    8    8    - rwx-- ld.so.1
    FFBFA000   24   24   24    - rwx--  [ stack ]
    -------- ------- ------- ------- -------
    total Kb  50464  42264  18888  16384

Example 3: Displaying Page Size Information
  The -s option can be used to display the hardware transla-
  tion page sizes for each portion of the address space. (See
  memcntl(2) for futher information on Solaris multiple page
  size support).
  In the example below, we can see that the majority of the
  mappings are using an 8K-Byte page size, while the heap is
  using a 4M-Byte page size.
  Notice that non-contiguous regions of resident pages of the
  same page size are reported as separate mappings. In the
  example below, the libc.so library is reported as separate
  mappings, since only some of the libc.so text is resident:

  example$ pmap -xs 15492
  15492: ./maps
  Address Kbytes   RSS  Anon Locked Pgsz Mode  Mapped File
  00010000    8    8    -    -  8K r-x-- maps
  00020000    8    8    8    -  8K rwx-- maps
  00022000  3960  3960  3960    -  8K rwx--  [ heap ]
  00400000  8192  8192  8192    -  4M rwx--  [ heap ]
  00C00000  4096    -    -    -  - rwx--  [ heap ]
  01000000  4096  4096  4096    -  4M rwx--  [ heap ]
  03000000  1024  1024    -    -  8K rw-s- dev:0,2 ino:4628487
  04000000   512   512   512    -  8K rw--- dev:0,2 ino:4628487
  04080000   512   512    -    -  - rw--- dev:0,2 ino:4628487
  05000000   512   512   512    -  8K rw--R dev:0,2 ino:4628487
  05080000   512   512    -    -  - rw--R dev:0,2 ino:4628487
  06000000  1024  1024  1024    -  8K rw---  [ anon ]
  07000000   512   512   512    -  8K rw--R  [ anon ]
  08000000  8192  8192    -  8192  - rwxs-  [ dism shmid=0x5]
  09000000  4096  4096    -    -  8K rwxs-  [ dism shmid=0x4]
  0A000000  4096    -    -    -  - rwxs-  [ dism shmid=0x2]
  0B000000  8192  8192    -  8192  4M rwxsR  [ ism shmid=0x3 ]
  FF280000   136   136    -    -  8K r-x-- libc.so.1
  FF2A2000   120   120    -    -  - r-x-- libc.so.1
  FF2C0000   128   128    -    -  8K r-x-- libc.so.1
  FF2E0000   200   200    -    -  - r-x-- libc.so.1
  FF312000   48   48    -    -  8K r-x-- libc.so.1
  FF31E000   48   40    -    -  - r-x-- libc.so.1
  FF33A000   32   32   32    -  8K rwx-- libc.so.1
  FF390000    8    8    -    -  8K r-x-- libc_psr.so.1
  FF3A0000    8    8    -    -  8K r-x-- libdl.so.1
  FF3B0000    8    8    8    -  8K rwx--  [ anon ]
  FF3C0000   152   152    -    -  8K r-x-- ld.so.1
  FF3F6000    8    8    8    -  8K rwx-- ld.so.1
  FFBFA000   24   24   24    -  8K rwx--  [ stack ]
  -------- ------- ------- ------- -------
  total Kb  50464  42264  18888  16384
Example 4: Displaying swap reservations
   The -S option can be used to describe the swap reservations
   for a process. The amount of swap space reserved is
   displayed for each mapping within the process. Swap reserva-
   tions are reported as zero for shared mappings, since they
   are accounted for only once system wide.
       example$ pmap -S 15492
       15492: ./maps
       Address Kbytes  Swap Mode  Mapped File
       00010000    8    - r-x-- maps
       00020000    8    8 rwx-- maps
       00022000  20344  20344 rwx--  [ heap ]
       03000000  1024    - rw-s- dev:0,2 ino:4628487
       04000000  1024  1024 rw--- dev:0,2 ino:4628487
       05000000  1024   512 rw--R dev:0,2 ino:4628487
       06000000  1024  1024 rw---  [ anon ]
       07000000   512   512 rw--R  [ anon ]
       08000000  8192    - rwxs-  [ dism shmid=0x5]
       09000000  8192    - rwxs-  [ dism shmid=0x4]
       0A000000  8192    - rwxs-  [ dism shmid=0x2]
       0B000000  8192    - rwxsR  [ ism shmid=0x3]
       FF280000   680    - r-x-- libc.so.1
       FF33A000   32   32 rwx-- libc.so.1
       FF390000    8    - r-x-- libc_psr.so.1
       FF3A0000    8    - r-x-- libdl.so.1
       FF3B0000    8    8 rwx--  [ anon ]
       FF3C0000   152    - r-x-- ld.so.1
       FF3F6000    8    8 rwx-- ld.so.1
       FFBFA000   24   24 rwx--  [ stack ]
       -------- ------- -------
       total Kb  50464  23496

   The swap reservation information can be used to estimate the
   amount of virtual swap used by each additional process. Each
   process consumes virtual swap from a global virtual swap
   pool. Global swap reservations are reported by the 'avail'
   field of the swap(1M) command.

EXIT STATUS
   The following exit values are returned:
   0   Successful operation.
   non-zero
      An error has occurred.
FILES
   /proc/*
      process files
   /usr/proc/lib/*
      proc tools supporting files


ATTRIBUTES
   See attributes(5) for descriptions of the following attributes:

   ____________________________________________________________
  |    ATTRIBUTE TYPE    |    ATTRIBUTE VALUE    |
  |_____________________________|_____________________________|
  | Availability        | SUNWesu (32-bit)      |
  |_____________________________|_____________________________|
  |               | SUNWesxu (64-bit)      |
  |_____________________________|_____________________________|
  | Interface Stability     |               |
  |_____________________________|_____________________________|
  |   Command Syntax     | Evolving          |
  |_____________________________|_____________________________|
  |   Output Format(s)    | Unstable          |
  |_____________________________|_____________________________|

SEE ALSO
   ldd(1),  mdb(1),  proc(1),  ps(1),  swap(1M),  mmap(2),
   memcntl(2), shmop(2), dlopen(3DL), proc(4), attributes(5)
  • + Share This
  • 🔖 Save To Your Account

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020