summaryrefslogtreecommitdiff
path: root/sysdeps/osf1/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/osf1/mem.c')
-rw-r--r--sysdeps/osf1/mem.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sysdeps/osf1/mem.c b/sysdeps/osf1/mem.c
index edb24ca7..b6141a81 100644
--- a/sysdeps/osf1/mem.c
+++ b/sysdeps/osf1/mem.c
@@ -33,6 +33,14 @@ static const unsigned long _glibtop_sysdeps_mem =
(1 << GLIBTOP_MEM_TOTAL) + (1 << GLIBTOP_MEM_USED) +
(1 << GLIBTOP_MEM_FREE);
+/* Init function. */
+
+void
+glibtop_init_mem_s (glibtop *server)
+{
+ server->sysdeps.mem = _glibtop_sysdeps_mem;
+}
+
/* Provides information about memory usage. */
void
@@ -40,7 +48,7 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
{
vm_statistics_data_t vmstats;
- glibtop_init_s (&server, 0, 0);
+ glibtop_init_s (&server, GLIBTOP_SYSDEPS_MEM, 0);
memset (buf, 0, sizeof (glibtop_mem));
@@ -54,6 +62,6 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
/* [FIXME]: Is this correct? */
buf->total = (vmstats.active_count + vmstats.inactive_count +
- vmstats.free_count + vmstats.wire_count) *
- vmstats.pagesize;
+ vmstats.free_count + vmstats.wire_count) *
+ vmstats.pagesize;
}