Memory_linux

Process memory

/proc/[pid]/statm
       Provides information about memory usage, measured in pages.
       The columns are:

           size       (1) total program size
                      (same as VmSize in /proc/[pid]/status)
           resident   (2) resident set size
                      (same as VmRSS in /proc/[pid]/status)
           shared     (3) number of resident shared pages (i.e., backed by a file)
                      (same as RssFile+RssShmem in /proc/[pid]/status)
           text       (4) text (code)
           lib        (5) library (unused since Linux 2.6; always 0)
           data       (6) data + stack
           dt         (7) dirty pages (unused since Linux 2.6; always 0)
1
2
cat /proc/3760/statm 
400865 96456 37653 27355 0 157019 0

Second field means res (resident)
pmap $(pgrep bash)

There are some of share library in each resident

If you want get share library memory consumption.
/proc/[pid]/smaps (since Linux 2.6.14)
This file shows memory consumption for each of the process’s
mappings. (The pmap(1) command displays similar information,
in a form that may be easier for parsing.)

Slab

In-kernel data structures cache.

Cache pool for often userd dupulication objects
you could found these objects from slabtop

Get all slabsize
awk ‘BEGIN{sum=0;}{sum=sum+$3*$4;}END{print sum/1024/1024}’ /proc/slabinfo MB

Page table

awk ‘$0~/PageTables/ {print $2}’ /proc/meminfo KB

Struct page

page frame minimum unit. every page frame has a struct page to point
struct page could mapping page frame to physical address
all page frame in the LUR list.
There are 2.3%(96/4096) usage in linux 2.6.32