Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Memory Leak tools for Windows-7 (64-bit) & VC++ 2008 ???
QtWS25 Last Chance

Memory Leak tools for Windows-7 (64-bit) & VC++ 2008 ???

Scheduled Pinned Locked Moved C++ Gurus
21 Posts 10 Posters 17.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scumpyt
    wrote on 15 Feb 2012, 21:59 last edited by
    #1

    I know that there are previous posts on this subject, but I have exhausted most of those suggestions, and am hoping that SOMEBODY has something new to offer me.

    I have had Micro Focus / DevPartner / BoundsChecker installed for a year now, and have had NOTHING but problems with it. It has caused more frustration than it has cured. I'm done!

    I spoke with the Purify guys about a year ago, and they said they did support Windows-7 (but it wasn't stable yet), nor did they really support Visual Studio 2008. I have an email into them to see if this has changed.

    We tried to use something called LeakWatcher (which is very similar to the "Visual Leak Detector" suggestion, in that it makes use of the Windows CRT stuff), but it intrusive, it wasn't very satisfying, and didn't give us much help with 3rd party libs.... Sigh!!!

    I used valgrind on unix/linux in the past, and it worked MUCH better than that, and it was free also...

    I also used Purify on Sun's (perhaps 20 years ago), and it worked tremendously! It wasn't very intrusive, and it didn't slow down your executable much at all, and it gave you very reliable, useful results.

    THOSE are the types of tools I'm looking for...

    Does anybody have any new suggestions???

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on 15 Feb 2012, 22:08 last edited by
      #2

      This doesn't have anything to do with Qt, I suggest the C++ Gurus section instead.

      Also, if Valgrind works under VM you can install some Linux distro and connect to the VM as if it is a real machine and use Valgrind remotely.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on 15 Feb 2012, 23:26 last edited by
        #3

        Moved to C++ Gurus.

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          steno
          wrote on 15 Feb 2012, 23:36 last edited by
          #4

          In terms of memory leaks, you don't need a fancy third party library.

          http://msdn.microsoft.com/en-US/library/e5ewb1h3(v=vs.80).aspx

          1 Reply Last reply
          0
          • S Offline
            S Offline
            scumpyt
            wrote on 16 Feb 2012, 03:27 last edited by
            #5

            Thanks steno, but I have already tried the windows CRTdbg stuff...
            I was hoping for for something more...

            1 Reply Last reply
            0
            • S Offline
              S Offline
              steno
              wrote on 16 Feb 2012, 15:31 last edited by
              #6

              So, you tried it and did it work?

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giesbert
                wrote on 16 Feb 2012, 16:04 last edited by
                #7

                This CRTdbg stuff finds some memory leaks, but not all. But it's a good starting point :-)
                Me personally, I use Purify on windows, or FindLeak, which are both commercial tools.

                Nokia Certified Qt Specialist.
                Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  steno
                  wrote on 16 Feb 2012, 16:10 last edited by
                  #8

                  [quote author="Gerolf" date="1329408246"]This CRTdbg stuff finds some memory leaks, but not all.[/quote]

                  I would be curious if you know of an example where the crtdbg fails.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    scumpyt
                    wrote on 16 Feb 2012, 16:17 last edited by
                    #9

                    Thanks guys... I hadn't heard of FindLeak yet... I'll have a look at that!

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      giesbert
                      wrote on 16 Feb 2012, 16:34 last edited by
                      #10

                      [quote author="steno" date="1329408638"]
                      [quote author="Gerolf" date="1329408246"]This CRTdbg stuff finds some memory leaks, but not all.[/quote]

                      I would be curious if you know of an example where the crtdbg fails.[/quote]

                      Try to find COM memory leaks with CRTdbg, as it is not allocated by the msvcrt dll, it's in the kernel ;-).
                      So stuff like new is typically found, that's correct.

                      Nokia Certified Qt Specialist.
                      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        goetz
                        wrote on 16 Feb 2012, 23:17 last edited by
                        #11

                        A list of such tools is on the "Tools for Profiling and Memory Checking":/wiki/Profiling-and-Memory-Checking-Tools page in the wiki.

                        http://www.catb.org/~esr/faqs/smart-questions.html

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          scumpyt
                          wrote on 16 Feb 2012, 23:33 last edited by
                          #12

                          Volker, thanks for that. I didn't know that was there.

                          I found out through my searches that the PurifyPlus suite of tools is supposed to finally support Windows-7, so I am going through the motions of doing an eval...

                          Has anybody else had any experience with this stuff on Windows-7 (64-bit, but 32-bit applications), Visual Studio-2008 and with or without QT??? Any feedback positive or negative would be welcome.

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            TioRoy
                            wrote on 12 Mar 2012, 23:27 last edited by
                            #13

                            scumpyt,

                            Recently we had problem here to detect leak memory in a big project.

                            We use WinDbg only.

                            • Running gflags.exe to instruct mscrt to "Create user mode stack trace database":

                            @gflags.exe /i <exe> +ust@

                            • Run the application and attach to EXE or

                            • Creating a memory dump during the execution of application

                            With the dump file, you can check the heap, searching for leaks (busy memory)

                            WinDbg has many commands, but we use basically these:

                            !heap -s
                            (to summarise the heap allocation table)
                            !heap -stat -h <heap handle>
                            ( show usage stats of handle - show by allocation size)
                            !heap -flt s <size>
                            (filter to show the allocations of size especified)
                            !heap -p -a <addr>
                            (shows details of allocation - with stacktrace)

                            Note: you need the PDB files to WinDbg get the correct symbol information about youe application.

                            You can take information about WinDbg:

                            http://windbg.org/ (check the symbol server settings in page)
                            http://windbg.info/doc/1-common-cmds.html (check item 20)

                            You can use the new SDK from Microsoft (Windows 8 Consumer Preview) to install WinDbg. It has less bugs (http://msdn.microsoft.com/en-us/windows/hardware/gg463009)

                            The interface of WinDbg is weird. But it help me a lot.

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              KeithS
                              wrote on 15 Apr 2012, 15:49 last edited by
                              #14

                              If you want some good tools for e.g memory leak checking, performance profiling, code coverage checking, thread checking etc. on Windows, look no further than:

                              http://www.softwareverify.com

                              I have no connection to these guys, just a happy customer for several years now. The thing I like about them is:

                              • you don't have to make ANY changes to your code to use them.
                              • they present the results graphically in an intelligent way, something that cannot ever be said for e.g. valgrind.
                              • they are relatively inexpensive.
                              • if you get a problem their developers are quick to respond.
                              • they work. Need I say more?
                              1 Reply Last reply
                              0
                              • N Offline
                                N Offline
                                Nepal
                                wrote on 23 Oct 2012, 12:59 last edited by
                                #15

                                Valgrind has no competitors!
                                Hi! I have a similar question. Guru advised many different debuggers. A few of them are really effective. But most of them do not do their job well. Now my work computer was installed deleaker, Not a bad debugger, but the program is paid :( This is a minus

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  Macro
                                  wrote on 23 Oct 2012, 13:24 last edited by
                                  #16

                                  Sorry for erasing my previous comment. I just made a small mistake. Hope i will not continue it again.

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    scumpyt
                                    wrote on 23 Oct 2012, 15:07 last edited by
                                    #17

                                    Riz, can you tell us where you find the Valgrind tool for Windows? Is it the in-development version from
                                    http://sourceforge.net/projects/valgrind4win/
                                    or somewhere else. If it IS this sourceforge version, how stable is it?

                                    Thanks in advance...

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      Macro
                                      wrote on 24 Oct 2012, 07:09 last edited by
                                      #18

                                      You have to use "Wine and Valgrind.":http://wiki.winehq.org/Wine_and_Valgrind . Check this Link for more updates...

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        Macro
                                        wrote on 24 Oct 2012, 07:10 last edited by
                                        #19

                                        This can also be Useful "Good Valgrind Substitute for Windows":http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows

                                        1 Reply Last reply
                                        0
                                        • N Offline
                                          N Offline
                                          Nepal
                                          wrote on 24 Oct 2012, 13:19 last edited by
                                          #20

                                          I have heard about wine! It seems that this is not a bad tool!

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved