Memory Leak Detection

Discussion in 'C++' started by Winbatch, Feb 23, 2005.

  1. Winbatch

    Winbatch Guest

    Is there a free or shareware tool to detect memory leaks in C++ programs?
    I've done a variety of google searches but either came up with commercial
    products or ones I could not get to detect blatantly leaking code.
    Winbatch, Feb 23, 2005
    #1
    1. Advertising

  2. Winbatch

    Guest

    , Feb 23, 2005
    #2
    1. Advertising

  3. Winbatch

    Guest

    , Feb 23, 2005
    #3
  4. Winbatch

    Winbatch Guest

    Winbatch, Feb 23, 2005
    #4
  5. Markus Elfring, Feb 23, 2005
    #5
  6. Winbatch

    Winbatch Guest

    These appear to be either for C ( to detect malloc) or java , or bad
    links...
    "Markus Elfring" <> wrote in message
    news:...
    >> Is there a free or shareware tool to detect memory leaks in C++ programs?

    >
    > Is a software that fits to your needs listed in this article?
    > http://en.wikipedia.org/wiki/Memory_debugger
    >
    > Regards,
    > Markus
    >
    >
    Winbatch, Feb 24, 2005
    #6
  7. Winbatch

    E. Mark Ping Guest

    In article <DZTSd.11318$>,
    Winbatch <> wrote:
    >Is there a free or shareware tool to detect memory leaks in C++ programs?
    >I've done a variety of google searches but either came up with commercial
    >products or ones I could not get to detect blatantly leaking code.


    The Boehm Collector is free, and can be used to detect leaks.
    http://www.hpl.hp.com/personal/Hans_Boehm/gc/
    --
    Mark Ping
    E. Mark Ping, Feb 24, 2005
    #7
  8. Winbatch

    Winbatch Guest

    This also appears to be C (malloc/free) related based on this:

    Using the Garbage Collector as Leak Detector
    The garbage collector may be used as a leak detector. In this case, the
    primary function of the collector is to report objects that were allocated
    (typically with GC_MALLOC), not deallocated (normally with GC_FREE), but are
    no longer accessible


    "E. Mark Ping" <> wrote in message
    news:cvjasv$1ne3$...
    > In article <DZTSd.11318$>,
    > Winbatch <> wrote:
    >>Is there a free or shareware tool to detect memory leaks in C++ programs?
    >>I've done a variety of google searches but either came up with commercial
    >>products or ones I could not get to detect blatantly leaking code.

    >
    > The Boehm Collector is free, and can be used to detect leaks.
    > http://www.hpl.hp.com/personal/Hans_Boehm/gc/
    > --
    > Mark Ping
    >
    Winbatch, Feb 24, 2005
    #8
  9. Winbatch

    E. Mark Ping Guest

    In article <EmaTd.11405$>,
    Winbatch <> wrote:
    >This also appears to be C (malloc/free) related based on this:
    >
    >Using the Garbage Collector as Leak Detector
    >The garbage collector may be used as a leak detector. In this case, the
    >primary function of the collector is to report objects that were allocated
    >(typically with GC_MALLOC), not deallocated (normally with GC_FREE), but are
    >no longer accessible


    It's both C and C++ compatible. It's a widely known GC implementation
    for C and C++. Use it or not, I really don't care.
    --
    Mark Ping
    E. Mark Ping, Feb 24, 2005
    #9
  10. Winbatch

    Winbatch Guest

    All I was asking is if it would detect 'new' and 'delete' bugs and not just
    malloc and free. ( I only use new and delete).
    "E. Mark Ping" <> wrote in message
    news:cvjo93$1rcb$...
    > In article <EmaTd.11405$>,
    > Winbatch <> wrote:
    >>This also appears to be C (malloc/free) related based on this:
    >>
    >>Using the Garbage Collector as Leak Detector
    >>The garbage collector may be used as a leak detector. In this case, the
    >>primary function of the collector is to report objects that were allocated
    >>(typically with GC_MALLOC), not deallocated (normally with GC_FREE), but
    >>are
    >>no longer accessible

    >
    > It's both C and C++ compatible. It's a widely known GC implementation
    > for C and C++. Use it or not, I really don't care.
    > --
    > Mark Ping
    >
    Winbatch, Feb 24, 2005
    #10
  11. On Wed, 23 Feb 2005 04:51:47 GMT, "Winbatch" <> wrote:

    >Is there a free or shareware tool to detect memory leaks in C++ programs?
    >I've done a variety of google searches but either came up with commercial
    >products or ones I could not get to detect blatantly leaking code.
    >


    There was an posting in clc++.moderated about a memory leak detector and
    how to write one yourself (or at least adapt a detector to handle the new
    and delete operators). The only problem is that it relies on macros, which
    can interfere with programs using the placement new and delete operators.
    http://wyw.dcweb.cn/leakage.htm
    Raymond Martineau, Feb 24, 2005
    #11
  12. Winbatch

    NitinTheEmbeddedFreak

    Joined:
    Apr 15, 2009
    Messages:
    1
    Regarding memory leak detection

    Hey you can use mtrace and/or dmalloc utilities in linux:stupido:
    NitinTheEmbeddedFreak, Apr 15, 2009
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. __jakal__

    c++ memory leak detection

    __jakal__, Apr 28, 2004, in forum: C++
    Replies:
    9
    Views:
    5,059
    StarDrago
    May 24, 2012
  2. Spur
    Replies:
    1
    Views:
    387
    Howard Hinnant
    May 9, 2004
  3. mosaic

    About memory leak detection.

    mosaic, Jul 15, 2004, in forum: C Programming
    Replies:
    7
    Views:
    359
    Bernhard
    Jul 16, 2004
  4. Replies:
    8
    Views:
    969
    Ian Collins
    Nov 3, 2006
  5. Archana

    Memory Leak detection

    Archana, Feb 4, 2008, in forum: C++
    Replies:
    1
    Views:
    327
    Ian Collins
    Feb 4, 2008
Loading...

Share This Page