The man page for top defines SHR as:

t: SHR -- Shared Mem size (kb) The amount of shared memory used by a task. It simply reflects memory that could be potentially shared with other processes.

I can see this growing for one process but I am unsure of what exactly is being reported here. The shared object library linked by this process is allocating and deallocating memory but not opening any shared memory segments, and pmap is not showing any other libraries being loaded. What else makes up the shared memory size, and how else can I get information about it?

  • 1
    Shared memory can be IPC shared memory (check ipcs -m), shared object libraries or mapped files in memory (see pmap or cat /proc/<pid>/maps) and POSIX shared memory (see ls -l /dev/shm). Did you investigate all those places? – Huygens Feb 27 '13 at 21:29

Shared memory are virtual memory segments without the rss mapped unless they are touched or are huge pages, from top you see the shared virtual memory size, in my redhat server i look "cat /proc/sysvipc/shm"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.