added `locked' member to this structure for SunOS.

* include/glibtop/mem.h (_glibtop_mem): added `locked'
member to this structure for SunOS.
This commit is contained in:
Martin Baulig
1998-05-24 16:15:24 +00:00
parent b281735ba7
commit ff3aced01e
4 changed files with 13 additions and 8 deletions

View File

@@ -49,10 +49,10 @@ main (int argc, char *argv [])
glibtop_get_mem (&data.mem);
fprintf (stderr, "Memory (0x%08lx): %lu, %lu, %lu, %lu, %lu, %lu, %lu\n",
fprintf (stderr, "Memory (0x%08lx): %lu, %lu, %lu, %lu, %lu, %lu, %lu, %lu\n",
data.mem.flags, data.mem.total, data.mem.used, data.mem.free,
data.mem.shared, data.mem.buffer, data.mem.cached,
data.mem.user);
data.mem.user, data.mem.locked);
glibtop_get_swap (&data.swap);

View File

@@ -34,8 +34,9 @@ __BEGIN_DECLS
#define GLIBTOP_MEM_BUFFER 4
#define GLIBTOP_MEM_CACHED 5
#define GLIBTOP_MEM_USER 6
#define GLIBTOP_MEM_LOCKED 7
#define GLIBTOP_MAX_MEM 7
#define GLIBTOP_MAX_MEM 8
typedef struct _glibtop_mem glibtop_mem;
@@ -48,7 +49,8 @@ struct _glibtop_mem
shared, /* GLIBTOP_MEM_SHARED */
buffer, /* GLIBTOP_MEM_BUFFER */
cached, /* GLIBTOP_MEM_CACHED */
user; /* GLIBTOP_MEM_USER */
user, /* GLIBTOP_MEM_USER */
locked; /* GLIBTOP_MEM_LOCKED */
};
#define glibtop_get_mem(mem) glibtop_get_mem__r(glibtop_global_server, mem)

View File

@@ -38,5 +38,6 @@ SCM glibtop_guile_get_mem (void)
gh_ulong2scm (mem.buffer),
gh_ulong2scm (mem.cached),
gh_ulong2scm (mem.user),
gh_ulong2scm (mem.locked),
SCM_UNDEFINED);
}

View File

@@ -24,14 +24,14 @@
const char *glibtop_names_mem [GLIBTOP_MAX_MEM] =
{
"total", "used", "free", "shared", "buffer",
"cached", "user"
"cached", "user", "locked"
};
const char *glibtop_types_mem [GLIBTOP_MAX_MEM] =
{
"unsigned long", "unsigned long", "unsigned long",
"unsigned long", "unsigned long", "unsigned long",
"unsigned long"
"unsigned long", "unsigned long"
};
const char *glibtop_labels_mem [GLIBTOP_MAX_MEM] =
@@ -42,7 +42,8 @@ const char *glibtop_labels_mem [GLIBTOP_MAX_MEM] =
N_("Shared Memory"),
N_("Buffers"),
N_("Cached"),
N_("User")
N_("User"),
N_("Locked"),
};
const char *glibtop_descriptions_mem [GLIBTOP_MAX_MEM] =
@@ -53,5 +54,6 @@ const char *glibtop_descriptions_mem [GLIBTOP_MAX_MEM] =
N_("Shared memory size in kB"),
N_("Size of buffers kB"),
N_("Size of cached memory in kB"),
N_("Memory used from user processes in kB")
N_("Memory used from user processes in kB"),
N_("Memory in locked pages in kB")
};