Open SCAP Library: memusage.h Source File

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

memusage.h
1 #ifndef MEMUSAGE_H
2 #define MEMUSAGE_H
3
4 #if defined(__linux__)
5 # define MEMUSAGE_LINUX_PROC_STATUS "/proc/self/status"
6 # define MEMUSAGE_LINUX_PROC_ENV "MEMUSAGE_PROC_STATUS"
7 # define MEMUSAGE_LINUX_SYS_STATUS "/proc/meminfo"
8 # define MEMUSAGE_LINUX_SYS_ENV "MEMUSAGE_SYS_STATUS"
9 #endif /* __linux__ */
10
11 struct proc_memusage {
12 size_t mu_rss;
13 size_t mu_hwm;
14 size_t mu_lib;
15 size_t mu_text;
16 size_t mu_data;
17 size_t mu_stack;
18 size_t mu_lock;
19 };
20
21 struct sys_memusage {
22 size_t mu_total;
23 size_t mu_free;
24 size_t mu_realfree;
25 size_t mu_buffers;
26 size_t mu_cached;
27 size_t mu_active;
28 size_t mu_inactive;
29 };
30
31 int oscap_proc_memusage(struct proc_memusage *mu);
32 int oscap_sys_memusage(struct sys_memusage *mu);
33
34 #endif /* MEMUSAGE_H */
proc_memusage
Definition: memusage.h:11
sys_memusage
Definition: memusage.h:21