Live data from Hacker News

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

github.com

11–20 of 35 posts

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

#12
post #4

Doesn't work on a Mac.

Yes, it says that in the README. Plenty of people use other operating systems, though.

> MTuner is a C/C++ memory profiler and memory leak finder for Windows, PS4, PS3, etc.

I don't see any mention of Mac at all in the Readme, and I find the "etc" part confusing. For example, I use FreeBSD. PS4 is based on FreeBSD. Does FreeBSD go under the "etc" part? If not then what does?

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

#14
post #9

Doesn't valgrind do this?

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?

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

#15
post #4

Earlier quoted context omitted.

Yes, it says that in the README. Plenty of people use other operating systems, though.

> MTuner is a C/C++ memory profiler and memory leak finder for Windows, PS4, PS3, etc. I don't see any mention of Mac at all in the Readme, and I find the "etc" part confusing. For example, I use FreeBSD. PS4 is based on FreeBSD. Does FreeBSD go under the "etc" part? If not then what does?

    > MTuner supports Windows, PlayStation 4 and PlayStation 3
    > out of the box. Additionally, any platform with GCC or
    > Clang based cross compiler can easily be supported with a
    > little extra work. Instrumentation API comes with full 
    > source code which means it’s a matter of porting a few 
    > routines to get it up and running on additional platforms.
http://mtuner.net/doc/overview_compilers.html

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

#17
I never used other memory profilers than MTuner mainly because not needing it, but also because MTuner works so well (for what I used it) I saw no reason to look for anything else: the combination of the different ways to view allocations/deallocations make for a very detailed yet uncomplicated view of your application's memory managment. E.g. first thing I noticed once was a constructor allocating 20 blocks of 8K and freeing them again just to initialize a vector, so that immediately tells you there's room for improvement there. Possibly other tools work just as well, but I can't compare.

It's also interesting just to look at all the data to figure out how exepensive some things are memory-wise. These days with the more modern C++ it's easy to forget what goes on under the hood. Nothing wrong with that per-se: C++ is usually performant enough that you just don't have to care about it at all. But if you have this typcial engineering mindset and like to know how stuff works just for the sake of it, and 'stuff' in this case is 'memory usage', then this is your tool.

Post reply on HN