summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-02-22 21:06:36 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-02-22 21:06:36 +0100
commitf4dfd14bb77fd884a0e5afe306c677e7e873f41d (patch)
treef3d6ae30ba9e6ff4b01c319091c8b2e67d24840e
parentb0db9bc55ce9b66d0fba511239c278d1a257a9ef (diff)
Add Buffers and Cached to /proc/meminfo
* rootdir.c (rootdir_gc_meminfo): Add Buffers and Cached, set to 0.
-rw-r--r--rootdir.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/rootdir.c b/rootdir.c
index 15ef8bc..1fa71b0 100644
--- a/rootdir.c
+++ b/rootdir.c
@@ -283,15 +283,18 @@ rootdir_gc_meminfo (void *hook, char **contents, ssize_t *contents_len)
*contents_len = asprintf (contents,
"MemTotal: %14lu kB\n"
"MemFree: %14lu kB\n"
+ "Buffers: %14lu kB\n"
+ "Cached: %14lu kB\n"
"Active: %14lu kB\n"
"Inactive: %14lu kB\n"
"Mlocked: %14lu kB\n"
"SwapTotal:%14lu kB\n"
"SwapFree: %14lu kB\n"
,
- /* TODO: check that these are really 1024-bytes kBs. */
(long unsigned) hbi.memory_size / 1024,
(long unsigned) vmstats.free_count * PAGE_SIZE / 1024,
+ 0,
+ 0,
(long unsigned) vmstats.active_count * PAGE_SIZE / 1024,
(long unsigned) vmstats.inactive_count * PAGE_SIZE / 1024,
(long unsigned) vmstats.wire_count * PAGE_SIZE / 1024,