1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _TOOLS_LINUX_MM_H
3 #define _TOOLS_LINUX_MM_H
5 #include <sys/syscall.h>
6 #include <linux/types.h>
9 long uptime; /* Seconds since boot */
10 unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
11 unsigned long totalram; /* Total usable main memory size */
12 unsigned long freeram; /* Available memory size */
13 unsigned long sharedram; /* Amount of shared memory */
14 unsigned long bufferram; /* Memory used by buffers */
15 unsigned long totalswap; /* Total swap space size */
16 unsigned long freeswap; /* swap space still available */
17 __u16 procs; /* Number of current processes */
18 __u16 pad; /* Explicit padding for m68k */
19 unsigned long totalhigh; /* Total high memory size */
20 unsigned long freehigh; /* Available high memory size */
21 __u32 mem_unit; /* Memory unit size in bytes */
26 static inline void si_meminfo(struct sysinfo *val)
28 BUG_ON(syscall(SYS_sysinfo, val));
31 #endif /* _TOOLS_LINUX_MM_H */