summaryrefslogtreecommitdiff
path: root/examples/procmap.c
diff options
context:
space:
mode:
authorBenoît Dejean <bdejean@src.gnome.org>2005-12-12 13:23:54 +0000
committerBenoît Dejean <bdejean@src.gnome.org>2005-12-12 13:23:54 +0000
commit52fa57a39bf5d46cff7e0a53047bce5892eab85e (patch)
treee6b449fbcdff6f30bcab8777ad056c85415db846 /examples/procmap.c
parentaa5ac8fc10d5c04fbdf78145aa5d933685ec796d (diff)
downloadlibgtop-52fa57a39bf5d46cff7e0a53047bce5892eab85e.tar.gz
Added quick example for glibtop_get_proclist() and updated procmap example
* .cvsignore: * Makefile.am: * proclist.c: (main): * procmap.c: (main): Added quick example for glibtop_get_proclist() and updated procmap example to display smap.
Diffstat (limited to 'examples/procmap.c')
-rw-r--r--examples/procmap.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/procmap.c b/examples/procmap.c
index 17501125..f28df1be 100644
--- a/examples/procmap.c
+++ b/examples/procmap.c
@@ -157,6 +157,18 @@ main (int argc, char *argv [])
perm);
}
+
+ g_print("smaps flags:%#llx size:%llu rss:%llu "
+ "shared_clean:%llu shared_dirty:%llu "
+ "private_clean:%llu private_dirty: %llu\n",
+ maps[i].flags,
+ maps[i].size >> 10,
+ maps[i].rss >> 10,
+ maps[i].shared_clean >> 10,
+ maps[i].shared_dirty >> 10,
+ maps[i].private_clean >> 10,
+ maps[i].private_dirty >> 10);
+
if (filename && (filename != maps [i].filename))
g_free ((void*)filename);
}