1

Really, I would like something similar to Java,How do I find out which class or method USES a lot of memory?, just for C++

Ideally, something for the stack too.

I'm working on a large codebase and trying to figure out where I could touch to optimize the memory usage of certain runs of the program, or perhaps parallelize it and split it across multiple compute nodes evenly.

I know Valgrind can help with memory LEAKS... but what about memory USAGE?

Cedar
  • 748
  • 6
  • 21
  • You probably need some library or utility to track this. And that may depend on what toolchain you are using. On msvc, I used to use a program called MemoryValidator however the free maintenance ended after a few years of usage and I never renewed. – drescherjm Oct 05 '20 at 14:45
  • You can also ask your [friendly memory allocation library](http://jemalloc.net/jemalloc.3.html) to track allocations based on call stacks. – Botje Oct 05 '20 at 14:49

0 Answers0