Hacker News new | past | comments | ask | show | jobs | submit login
MTuner: C/C++ memory profiler and memory leak finder (github.com/milostosic)
45 points by ingve on June 25, 2023 | hide | past | favorite | 8 comments



MTuner is a stellar tool. It doesn't require modifying or re-compiling your program. Once upon a time I had a subtle memory leak and it took less than 5 minutes from downloading to know exactly what was causing my leak and how to fix it. A++ great tool.


... And the only (?) memory profiler for Windows.


Why should I use MTuner as opposed to Valgrind Massif or Heaptrack?

Edit: some links: https://milostosic.github.io/MTuner/overview/why/ https://milostosic.github.io/MTuner/overview/how/


Valgrind and Heaptrack don't support Windows. MTuner doesn't support Linux.

I'm not sure how the feature set compares MTuner. It looks like MTuner has a much richer and robust GUI for exploring the data. I'm not sure if it's intrinsically more capable. But it's certainly more user friendly and accessible!


In addition, Valgrind is based on a VM and is very slow (a 10x slowdown is typical). MTuner is based on code injection and is presumably much faster.

Valgrind approach has the advantage of being very reliable, flexible, and able to run software unmodified. It has many tools (sanitizers, profilers, ...) and they are all best in class. They typically don't offer GUIs but there are external visualizers. It biggest disadvantage, besides not supporting Windows is that it is awfully slow, so much that it is generally unacceptable for user acceptance testing, let alone production, and sometimes, it is effectively not usable at all.

If it is like other memory debuggers I have used (ex: dmalloc), it is fast enough for normal use, but not as exhaustive, and sometimes a bit finnicky.


"besides not supporting Windows..."

well don't forget macOS. definitely needs more contributors :D


I unzipped the latest release and ran the executable and it was immediately flagged as a Trojan by Windows Defender and removed from the folder.


That makes sense, its purpose is to alter the behavior of other programs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: