Crate malloc_info

Source
Expand description

This crate provides safe access to glibc’s malloc_info function. See the malloc_info(3) page for details on that function.

§Example

let info = malloc_info().expect("malloc_info");
println!("{:#?}", info);

§Caveats

malloc_info is a glibc-specific function and is not available on all platforms. This crate will not work on platforms where malloc_info is not available.

malloc_info will only report heap statistics for the glibc heap. If your program uses a different heap implementation, for example by #[global_allocator] or by using a different libc, malloc_info will not report statistics for that heap.

Modules§

info
Types for parsing the output of malloc_info from glibc.

Structs§

Error
Custom error type for errors occurring during the malloc_info call

Functions§

malloc_info
Safely get information from libc::malloc_info. See library-level documentation for more information.