04-05-2010 01:35 PM
Has anyone used the Windows Application Verifier with a CVI-built executable?
I'm curious if it works with a CVI developed app (maybe not in the debug mode but maybe in the logging mode?) and if it's capable of finding errors not detectable using a CVI debug build.
On a separate topic, I'm wonderingif there's anything available in CVI to help detect memory leaks? I seem to recall hearing that CVI 2009 had something like this, but maybe it's in the optional profiler that's not part of the FDS.
Thanks.
Menchar
04-05-2010 01:53 PM
Hey menchar -
I haven't used the Application Verifier, but a major feature of the CVI 9.0 release was the resource tracking window. From both a support standpoint and a development standpoint, I can vouch for it's ability to quickly track down memory leaks.
NickB
National Instruments
04-05-2010 02:01 PM
Nick -
Thanks for the reminder (again
) That must be where I saw it. The term "memory leak" doesn't show up in an index search in CVI 2009 Help unless I bungled it somehow.
I see Microsoft says to use PerfMon and watch private bytes as the app runs and also the allocated virtual memory. App verifier will do it too but maybe only when hooked up to a debugger.
Thanks again.
Menchar
04-05-2010 02:03 PM
Hi Menchar,
I consent: the resource tracking window turned out to be quite useful for me; I was able to detect and remove several memory leaks.
Wolfgang
04-06-2010 03:10 AM
hello nickb:
how to contact you?your e-mail?Do you konw where can i get the file named "niScope.h"?thank you!
04-06-2010 03:38 AM
Hello Yong_Z,
1) your contribution does not fit to this topic... Why don't you start a new thread, after searching the forum and the documentation,with an appropriate title?
2) Using Google, I found the following answer to your question: the software NIScope comes with NI digitizers, not with CVI
04-06-2010 05:04 AM
Hello Wolfgang,
Thank you very much for your attention and reply,I'm so excited!There are so many things I don't know,so I want to meet someone who is expert in this areas.
04-07-2010 07:02 PM
I've found over the years that one of the best ways to cure memory leaks I have induced is very simple. Do a search for every instance of alloc, malloc or calloc and be absolutely certain there is a free call to go with it.
I personally prefer not to do this but if you alloc memory in a function and pass the pointer back, you really need to document that a free is needed to clear that memory. Even if you are the only one using that function, make it explicitly clear because you may forget (I know I do). Good practice is to document these things in usage comments and/or any design documents you do.
As for detecting them, Windows PerfMon can help there as somebody mentioned in this thread.