I’ve had good results using Valgrind for memory profiling after switching to the system allocator (requires nightly Rust, for now). I used Valgrind’s DHAT as described by @nnethercote in a blog post about optimizing rustc. Other tools that work for C and C++ should also work for Rust as long as it’s built with alloc_system
instead of alloc_jemalloc
.
5 Likes