mem

mem

Synopsis


#include <glibtop/mem.h>


#define     GLIBTOP_MEM_TOTAL
#define     GLIBTOP_MEM_USED
#define     GLIBTOP_MEM_FREE
#define     GLIBTOP_MEM_SHARED
#define     GLIBTOP_MEM_BUFFER
#define     GLIBTOP_MEM_CACHED
#define     GLIBTOP_MEM_USER
#define     GLIBTOP_MEM_LOCKED
#define     GLIBTOP_MAX_MEM
            glibtop_mem;
void        glibtop_get_mem                 (glibtop_mem *buf);
#define     glibtop_get_mem_r
void        glibtop_get_mem_l               (glibtop *server,
                                             glibtop_mem *buf);
void        glibtop_init_mem_p              (glibtop *server);
void        glibtop_get_mem_p               (glibtop *server,
                                             glibtop_mem *buf);
void        glibtop_init_mem_s              (glibtop *server);
void        glibtop_get_mem_s               (glibtop *server,
                                             glibtop_mem *buf);

Description

Details

GLIBTOP_MEM_TOTAL

#define GLIBTOP_MEM_TOTAL	0


GLIBTOP_MEM_USED

#define GLIBTOP_MEM_USED	1


GLIBTOP_MEM_FREE

#define GLIBTOP_MEM_FREE	2


GLIBTOP_MEM_SHARED

#define GLIBTOP_MEM_SHARED	3


GLIBTOP_MEM_BUFFER

#define GLIBTOP_MEM_BUFFER	4


GLIBTOP_MEM_CACHED

#define GLIBTOP_MEM_CACHED	5


GLIBTOP_MEM_USER

#define GLIBTOP_MEM_USER	6


GLIBTOP_MEM_LOCKED

#define GLIBTOP_MEM_LOCKED	7


GLIBTOP_MAX_MEM

#define GLIBTOP_MAX_MEM		8


glibtop_mem

typedef struct {
	guint64	flags;
	guint64 total;		/* GLIBTOP_MEM_TOTAL	*/
	guint64 used;		/* GLIBTOP_MEM_USED	*/
	guint64 free;		/* GLIBTOP_MEM_FREE	*/
	guint64 shared;		/* GLIBTOP_MEM_SHARED	*/
	guint64 buffer;		/* GLIBTOP_MEM_BUFFER	*/
	guint64 cached;		/* GLIBTOP_MEM_CACHED	*/
	guint64 user;		/* GLIBTOP_MEM_USER	*/
	guint64 locked;		/* GLIBTOP_MEM_LOCKED	*/
} glibtop_mem;


glibtop_get_mem ()

void        glibtop_get_mem                 (glibtop_mem *buf);

Get the memory usage. Unless explicitly stated otherwise, all memory units are in bytes.

buf : Buffer where the output will be given.

glibtop_get_mem_r

#define     glibtop_get_mem_r


glibtop_get_mem_l ()

void        glibtop_get_mem_l               (glibtop *server,
                                             glibtop_mem *buf);

server :
buf :

glibtop_init_mem_p ()

void        glibtop_init_mem_p              (glibtop *server);

server :

glibtop_get_mem_p ()

void        glibtop_get_mem_p               (glibtop *server,
                                             glibtop_mem *buf);

server :
buf :

glibtop_init_mem_s ()

void        glibtop_init_mem_s              (glibtop *server);

server :

glibtop_get_mem_s ()

void        glibtop_get_mem_s               (glibtop *server,
                                             glibtop_mem *buf);

server :
buf :