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
use core::mem::size_of;
pub const SI_LOAD_SHIFT: i32 = 16;
#[repr(C)]
pub struct sysinfo_t {
pub uptime: isize,
pub loads: [usize; 3],
pub totalram: usize,
pub freeram: usize,
pub sharedram: usize,
pub bufferram: usize,
pub totalswap: usize,
pub freeswap: usize,
pub procs: u16,
pad: u16,
pub totalhigh: usize,
pub freehigh: usize,
pub mem_unit: u32,
f: [u8; 20 - 2 * size_of::<usize>() - size_of::<u32>()],
}