Live data from Hacker News

MTuner is a C/C++ memory profiler and memory leak finder

github.com

31–35 of 35 posts

Re: MTuner is a C/C++ memory profiler and memory leak finder

#31
post #29
post #25

Earlier quoted context omitted.

Windows is a pain to program on, It's really not, if you know how to do it. But that goes for any OS out there. I mean, put a seasoned visual-studio-on-windows-only dev in front of a linux box and tell him to set up the build of a non-trivial application and watch what happens. Chances are pretty high the answer is 'linux is a pain to program on' :] but I still want to use "normal" clang, so I have to generate a unix…

windows not being able to mix and match object files compiled in different ways is really disastrous. On linux and windows I always work in release mode. If I have problems on the linux side I can target compile 1 or 2 object files debug, relink, run and get stack traces if I need. That's all totally independent of programming environment.

That has nothing to do with Windows vs GNU/Linux, rather the compilers being used.

UNIX is more than just GNU/Linux, and Windows compilers are more than just Visual Studio.

Re: MTuner is a C/C++ memory profiler and memory leak finder

#32
post #29
post #25

Earlier quoted context omitted.

Windows is a pain to program on, It's really not, if you know how to do it. But that goes for any OS out there. I mean, put a seasoned visual-studio-on-windows-only dev in front of a linux box and tell him to set up the build of a non-trivial application and watch what happens. Chances are pretty high the answer is 'linux is a pain to program on' :] but I still want to use "normal" clang, so I have to generate a unix…

windows not being able to mix and match object files compiled in different ways is really disastrous. On linux and windows I always work in release mode. If I have problems on the linux side I can target compile 1 or 2 object files debug, relink, run and get stack traces if I need. That's all totally independent of programming environment.

True (apart from where you say 'windows' when meaning 'msvc toolset' as pointed out). It's actually the first time I see this come up as first and only argument against msvc actually. Would be interesting to find actual stats on this, but it's possible this doesn't come up often because it's sort of a minor issue; minor in the sense that it is not a real issue for the majority of users (though that doesn't mean that if you are affected by the issue that it can't be a dealbreaker). Maybe there are more people out there used to mostly working with debug builds? Or maybe because the overhead of having to build eveything in debug mode again only becomes significant with codebases much bigger than the average?

Re: MTuner is a C/C++ memory profiler and memory leak finder

#33
post #3

In case someone is looking for the equivalent on Linux and Mac, there is HeapTrack https://github.com/KDE/heaptrack edit: typo

I've been looking for something like this. Massif makes it look like my code is reasonably healthy. HeapTrack shows I'm doing absurd number of small heap allocations.

Re: MTuner is a C/C++ memory profiler and memory leak finder

#34
post #9

Earlier quoted context omitted.

Most of it (memcheck and massif), but good luck getting the important data out. Memcheck is fine, but massif is quite restricted as a object-level memory monitor. I can't talk for MTuner, but HeapTrack is very, very useful to track and eradicate temporary allocations (useless C++ object create when using `==` or passing by copy.

Sounds cool. Any pointers to useful tutorials on making that idea work?

Well, it's not really an idea. It is what HeapTrack and MTuner do. You install them, inspect the result, fix the worst offenders, repeat. There isn't much to it.
Post reply on HN