diff --git a/Cargo.lock b/Cargo.lock index 3fdf60cf..0664710e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -953,6 +953,16 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "page_size" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "parking_lot_core" version = "0.9.10" @@ -1065,6 +1075,7 @@ dependencies = [ "lru", "memmap2", "num-traits", + "page_size", "proc-maps", "py-spy-testdata", "rand", diff --git a/Cargo.toml b/Cargo.toml index c0e6c946..8327bd32 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,7 @@ lru = "0.10" num-traits = "0.2" regex = ">=1.6.0" tempfile = "3.6.0" +page_size = "0.6.0" proc-maps = "0.4.0" memmap2 = "0.9.4" cpp_demangle = "0.4" diff --git a/src/binary_parser.rs b/src/binary_parser.rs index 4df02687..7dae27b9 100644 --- a/src/binary_parser.rs +++ b/src/binary_parser.rs @@ -150,9 +150,11 @@ pub fn parse_binary(filename: &Path, addr: u64, size: u64) -> Result