Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tools for debugging of memory usage? [closed]

Are there any good Linux tools around to debug the memory usage of a C/C++ code? I find it very hard to figure out, in complex codes, which objects are responsible for the main memory usage.

like image 535
Thomas W. Avatar asked Apr 21 '26 09:04

Thomas W.


1 Answers

What you are looking for is massif :

Massif is a heap profiler. It performs detailed heap profiling by taking regular snapshots of a program's heap. It produces a graph showing heap usage over time, including information about which parts of the program are responsible for the most memory allocations. The graph is supplemented by a text or HTML file that includes more information for determining where the most memory is being allocated. Massif runs programs about 20x slower than normal.

like image 144
BЈовић Avatar answered Apr 22 '26 22:04

BЈовић



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!