I am writing an application and am surprised to see its total memory usage is already too high. I want to profile the dynamic memory usage of my application: How many objects of each kind are there in the heap, and which functions created these objects? Also, how much memory is used by each of the object?
Is there a simple way to do this? I am working on both linux and windows, so tools of any of the platforms would suffice.
NOTE: I am not concerned with memory leaks here.