4 releases
| 0.1.3 | Nov 24, 2025 |
|---|---|
| 0.1.2 | Jan 16, 2025 |
| 0.1.1 | Jan 15, 2025 |
| 0.1.0 | Jan 15, 2025 |
#330 in Memory management
322 downloads per month
15KB
313 lines
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.
malloc-info
This is a simple library to wrap glibc's malloc_info function in a safe, Rust
interface.
License
malloc-info is primarily distributed under the terms of both the MIT license
and the Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.
Copyright (c) 2025 Zetier
Dependencies
~1.6–4.5MB
~78K SLoC