File: mf.h

package info (click to toggle)
yiff 2.06-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 3,464 kB
  • ctags: 3,028
  • sloc: ansic: 47,463; makefile: 218; sh: 77
file content (57 lines) | stat: -rw-r--r-- 751 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
                             Memory Free

	Gets statistics on free and total memory.
 */

#ifndef MF_H
#define MF_H


#include <stdio.h>
#include <db.h>
#include <sys/types.h>
#include <limits.h>

/* Command to run the free program, includes required arguments. */
#if defined(__linux__)
# define FREE_CMD	"free"
#else
# define FREE_CMD	"free"
#endif



#ifndef NAME_MAX
# define NAME_MAX	256
#endif

#ifndef PATH_MAX
# define PATH_MAX	1024
#endif


/*
 *	Memory statistics structure:
 */
typedef struct {

	/* In bytes. */
	off_t	total,
		used,
		free,
		shared,
		buffers,
		cached,
		swap_total,
		swap_used,
		swap_free;

} mf_stat_struct;


extern off_t mf(mf_stat_struct *buf);
extern int MemoryFree(mf_stat_struct *buf);


#endif	/* DF_H */