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
//! Inspect Linux virtual memory metadata.
//!
//! The `mapped_region` module lets you see what VM regions are mapped.
//!
//! The `page_map` module lets you see physical info about each page (physical address, whether or
//! not it's swapped, etc).
extern crate byteorder;
extern crate lazy_static;
extern crate libc;
extern crate regex;
/// Return page size, if it is available on your platform. This can safely be cached; it will not
/// change during the lifetime of a process (per `sysconf(3)`.
///
/// Should work on any POSIX.1 platform (Linux, FreeBSD, macOS, ...).