locked
Memory Leak Detection for Windows Mobile 6.1 RRS feed

  • Question

  • I'm programming windows mobile application.

    I'd like to check memory leak for this application.

    I used the following code and _CrtDumpMemoryLeaks() for Windows Application.

     

    #define _CRTDBG_MAP_ALLOC

    #include <stdlib.h>

    #include <crtdbg.h>

     

    However, I can't use this code for windows mobile

    And there are some compile error.

     

    Please, Help me for memory leak detection of Windows Mobile Application.

    Monday, April 26, 2010 9:50 AM

Answers

All replies

  • To test for memory leaks on your Windows Mobile app, you can use the Application Verifier tool. MSDN has good documentation on the tool,

    Application Verifier Tool

    Application Verifier for Windows CE and Windows Mobile 5

     

    Prabhu
    www.geekswithblogs.net/techtwaddle

    • Marked as answer by warrentang Friday, April 30, 2010 4:13 AM
    Monday, April 26, 2010 10:05 AM
  • Are you coding in C++

    then override new and delete operator and use the counters and log  __FILE,__LINE macro into log files and do code coverage...

     

    Hope this works for you..

     

     

    Siva.

     


    -Siva. * Please mark as answer and vote if my post help to fix your issue.*
    Tuesday, April 27, 2010 12:44 AM
  • Thanks for good answer.

     

    Isn't there Application Verifier for Windows Mobile 6.0 or 6.1???

     

    Thanks in advance.

    Tuesday, April 27, 2010 2:13 AM
  • I'm sorry but I'm coding in C.

     

    Thanks.

    Tuesday, April 27, 2010 2:14 AM
  • The Application Verifier tool should work with Windows Mobile 6.0/6.1 as well.

     

    Prabhu
    www.geekswithblogs.net/techtwaddle

    Tuesday, April 27, 2010 3:02 AM
  • Where can I find the information and document how to apply

    this  application to windows mobile 6.0/6.1???

     

    Wednesday, April 28, 2010 7:28 AM
  • Where can I find the information and document how to apply

    this  application to windows mobile 6.0/6.1???

     


    PrabhuK's second link "Application Verifier for Windows CE and Windows Mobile 5.0" tells you how to use App verifer for Windows Mobile. It is no different to use it on Windows Mobile 5 than it is WM6 or WM6.1.

    -PaulH

    • Proposed as answer by Michael Koster Wednesday, April 28, 2010 7:32 PM
    • Marked as answer by warrentang Friday, April 30, 2010 4:13 AM
    Wednesday, April 28, 2010 2:13 PM
  • #define _CRTDBG_MAP_ALLOC

    #include <stdlib.h>

    #include <crtdbg.h>

    However, I can't use this code for windows mobile

    And there are some compile error.

    There is an upstarting project at SourceForge: <http://sourceforge.net/projects/crtdbg4wince/>.

    Currently not implemented all the Features from _CrtDbg for Desktop, but quite helpful for most problems.

    Try it out!

    Monday, May 14, 2012 5:04 AM
  • you could give _CrtDbg for WinCE a try: crtdbg4wince

    It is under active development and stated to be Alpha, but it can already find all your malloc, callor, realloc, strdup, new, new [] leaks.

    Aside of this, it also finds leaked CreateFile handles and more. "alpha" state is not because of lack of reliability, it's just because it not yet resembles all sophisticated commands of the original _CrtDbg API. It also need to be removed the .h and .cpp file from project for release build, but I have plans to fix this next few days.

    It's much easier to use than Appverify...
    Greetings to Sue Loh from here: Hi Sue, thank you for the MEDC'2007 talk and introduction of Appverify. I don't want to rant against Appverify & your CeLog here. But sometimes it doesn't resolve the locations for unknown reason. And sometimes I'm tired of explaining Appverify and it's pitfalls to new team mates...

    regards,
    Modem Man

    • Proposed as answer by Modem Man Thursday, May 24, 2012 6:58 PM
    Thursday, May 24, 2012 6:58 PM