I am working on a comparison between Rust and C and I would like to compare the memory usage of both algorithms. I think that Rust consumes less memory than C because of the use of iterators, but my question is, which tool is useful to calculate the memory usage ?
If you want to know byte-exact amount of memory allocated by Rust itself, you can instrument Rust's memory allocator. For example, there's cap. But for comparison with C, an external measurement will be more fair.