0

I have a C++ application using 400MB of heap and I'd like to know which cpp files/line numbers contributed the most for that allocation.

On Linux I've successfully used Massif for this purpose.

I'm not interested in knowing how to detect memory leaks, these allocations are all reachable.

Sergio Martins
  • 897
  • 2
  • 8
  • 18
  • memoryvalidator tracks this by hooking into your dlls and executables and replaces the new and delete with its own versions. This along with enabling symbols you are able to track what line of code allocated memory. This does come at a cost. The hooking takes a long time... – drescherjm Feb 20 '14 at 18:01
  • Since you don't have an answer yet, I'll throw in my 2 cents. For finding performance issues [*this is the method I use.*](http://stackoverflow.com/a/378024/23771) I would bet that if you're using a lot of memory, that would appear as a significant percent of time spent in `new`, which is very common. If so, it will tell what is being `new`ed so much, where, and why. – Mike Dunlavey Feb 21 '14 at 01:00

0 Answers0