Memory Leak Detection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Winbatch

    Memory Leak Detection

    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.


  • rajkumar@hotmail.com

    #2
    Re: Memory Leak Detection

    Depends on OS

    for linux you can try

    Download Valgrind, an open-source memory debugger for free. Valgrind, an open-source debugging and profiling toolsuite, is available from http://www.valgrind.org. Please visit that site if you want more information.


    Comment

    • rajkumar@hotmail.com

      #3
      Re: Memory Leak Detection

      Depends on OS

      for linux you can try

      Download Valgrind, an open-source memory debugger for free. Valgrind, an open-source debugging and profiling toolsuite, is available from http://www.valgrind.org. Please visit that site if you want more information.


      Comment

      • Winbatch

        #4
        Re: Memory Leak Detection

        For Sun Solaris.
        <rajkumar@hotma il.com> wrote in message
        news:1109135618 .146073.105900@ f14g2000cwb.goo glegroups.com.. .[color=blue]
        > Depends on OS
        >
        > for linux you can try
        >
        > http://sourceforge.net/projects/valgrind/
        >[/color]


        Comment

        • Markus Elfring

          #5
          Re: Memory Leak Detection

          > 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?


          Regards,
          Markus


          Comment

          • Winbatch

            #6
            Re: Memory Leak Detection

            These appear to be either for C ( to detect malloc) or java , or bad
            links...
            "Markus Elfring" <Markus.Elfring @web.de> wrote in message
            news:384eiqF5ij 0v6U1@individua l.net...[color=blue][color=green]
            >> Is there a free or shareware tool to detect memory leaks in C++ programs?[/color]
            >
            > Is a software that fits to your needs listed in this article?
            > http://en.wikipedia.org/wiki/Memory_debugger
            >
            > Regards,
            > Markus
            >
            >[/color]


            Comment

            • E. Mark Ping

              #7
              Re: Memory Leak Detection

              In article <DZTSd.11318$53 4.1031@twister. nyc.rr.com>,
              Winbatch <winbatch@techi e.com> wrote:[color=blue]
              >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.[/color]

              The Boehm Collector is free, and can be used to detect leaks.

              --
              Mark Ping
              emarkp@soda.CSU A.Berkeley.EDU

              Comment

              • Winbatch

                #8
                Re: Memory Leak Detection

                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" <emarkp@soda.cs ua.berkeley.edu > wrote in message
                news:cvjasv$1ne 3$1@agate.berke ley.edu...[color=blue]
                > In article <DZTSd.11318$53 4.1031@twister. nyc.rr.com>,
                > Winbatch <winbatch@techi e.com> wrote:[color=green]
                >>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.[/color]
                >
                > The Boehm Collector is free, and can be used to detect leaks.
                > http://www.hpl.hp.com/personal/Hans_Boehm/gc/
                > --
                > Mark Ping
                > emarkp@soda.CSU A.Berkeley.EDU[/color]


                Comment

                • E. Mark Ping

                  #9
                  Re: Memory Leak Detection

                  In article <EmaTd.11405$53 4.8522@twister. nyc.rr.com>,
                  Winbatch <winbatch@techi e.com> wrote:[color=blue]
                  >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[/color]

                  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
                  emarkp@soda.CSU A.Berkeley.EDU

                  Comment

                  • Winbatch

                    #10
                    Re: Memory Leak Detection

                    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" <emarkp@soda.cs ua.berkeley.edu > wrote in message
                    news:cvjo93$1rc b$1@agate.berke ley.edu...[color=blue]
                    > In article <EmaTd.11405$53 4.8522@twister. nyc.rr.com>,
                    > Winbatch <winbatch@techi e.com> wrote:[color=green]
                    >>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[/color]
                    >
                    > 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
                    > emarkp@soda.CSU A.Berkeley.EDU[/color]


                    Comment

                    • Raymond Martineau

                      #11
                      Re: Memory Leak Detection

                      On Wed, 23 Feb 2005 04:51:47 GMT, "Winbatch" <winbatch@techi e.com> wrote:
                      [color=blue]
                      >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.
                      >[/color]

                      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.


                      Comment

                      Working...