Thread: memchecker for Windows?

  1. #1
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,664

    memchecker for Windows?

    Is there a good memchecker for Windows like there is Valgrind for Linux? I've been trying out Dr. Memory but it's not that great... A lot of the kernel32.dll stuff winds up being in the output report from it and the overall error diagnostics are near impossible to read.

  2. #2
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    625
    There's one built into Windows, but to get useful callstacks easily you have to use a pdb-debug-type-outputting-compiler and WinDbg / cbd / ntsd & friends with it. Without either or both of those, you can at least print out a list of callstack addresses though. Here's how - A Whole Heap of Trouble << Just Let It Flow (don't look for part 2, I never wrote it)

    There's also Visual Leak Detector for something that just includes your own code instead of all Windows components. I think it still needs pdb files to work though. And of course, Visual Studio has its own debug crt that checks leaks from CRT allocations (Lookup _CrtSetDebugFlag, I can't remember the option names offhand)

    Otherwise, if you don't compile with anything that outputs pdb files I think Dr Memory is the best you can do. I guess you could use the callback mentioned in the above link and use libBFD to get symbols for the addresses. I think that's how I did it anyway, it's been years since I abandoned my resource leak tool.

    EDIT: Sigh, even OSROnline have deleted the page now. I can't edit the post right now, but you can find the ShutdownFlags description on this pageSupport Enhancements (Appendix: Windows DDK)
    Last edited by adeyblue; 01-27-2017 at 02:49 PM.

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,773
    I'm using Application Verifier.
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

  4. #4
    Registered User
    Join Date
    Feb 2017
    Posts
    8
    Purify
    Insure++

    For Visual C++, Visual Leak Detector.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Access Windows directory with OPENFILENAME in Windows mobile
    By nikhilesh1987 in forum Windows Programming
    Replies: 2
    Last Post: 05-31-2011, 02:49 AM
  2. Differences between Windows XP and Windows Vista programming
    By nathan3011 in forum Windows Programming
    Replies: 3
    Last Post: 01-15-2009, 10:05 AM
  3. Open an excel file from a windows service under Windows Vista
    By AdrianaLuby in forum C# Programming
    Replies: 1
    Last Post: 06-05-2007, 03:55 AM
  4. Replies: 4
    Last Post: 10-03-2005, 04:44 PM
  5. Replies: 6
    Last Post: 01-07-2002, 02:46 AM

Tags for this Thread