Thread: Memory profiling and debugging tools

  1. #1
    Banned nickname_changed's Avatar
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    986

    Memory profiling and debugging tools

    Hey guys,

    I'd like to hear some reccomendations on tools for monitoring applications created in C++ (with SDL) and reporting any and all memory leaks. I tried Memprof but couldn't get it to work

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Well I've used electric fence in the past with some success.
    Many others suggest valgrind as an alternative.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    Posts
    501
    Yeah, I used gprof once, but I didn't have profiling support compiled in my kernel. If you are looking at profiling, (you are), you need to enable profiling support.
    kernel-2.6.*
    profiling support->profiling support[*]
    Help populate a c/c++ help irc channel
    server: irc://irc.efnet.net
    channel: #c

  4. #4
    Registered User HaLCy0n's Avatar
    Join Date
    Mar 2003
    Posts
    77
    I personally use valgrind and gprof. I used electric fence in the past, but I don't think its being maintained any longer, and I believe it doesn't work if NPTL is enabled.

  5. #5
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,534
    Not a reccomendation (never used it), but you are free to check it out for yourself:

    http://www.inf.ethz.ch/personal/bier...ects/ccmalloc/

Popular pages Recent additions subscribe to a feed