[Insight-users] compiling itk with purify

Miller, James V (Research) millerjv at crd . ge . com
Mon, 23 Jun 2003 09:27:13 -0400


If you are running on Windows there is no real purify specific
things that need to be done.  If your executable is compiled
in Debug mode, then you simply run purify on your executable and
it instruments the executable, runs the instrumented executable, 
and generates a report.

If you are trying to Purify a release build, then you need to change
a few compile options.  Purify cannot really run on a release build
but the RelWithDebInfo settings are pretty close.  If you search the
help for Purify, there is information on "How to Purify a release build.".
Basically, if you build RelWithDebInfo this has almost all the compiler
options set correctly.  The only thing you need to do is add "/fixed:no
/incremental:no" to the RelWithDebInfo link options.

If you configure these options with CMake and are using the .NET compiler
then the options may be ignored.  I believe this was fixed in CMake but I am
not sure if a new patch was released with the fix.  What I do is just load
the workspace into Visual Studio .NET and add the options the link line
through the Visual Studio gui.  They will be annilated the next time
I run CMake but they usually stick around long enough that I can Purify the
executable I want. 

If you are running VC6, then you can just add these options to the link
options using CMake.

If you are unix, then I believe you need to link against Purify.  You'll
have to refer to the Purify docs to see how to do that.

Jim



> -----Original Message-----
> From: Suyash P. Awate [mailto:suyash at cs . utah . edu]
> Sent: Saturday, June 21, 2003 4:51 AM
> To: insight-users at itk . org
> Subject: [Insight-users] compiling itk with purify
> 
> 
> Hi,
> 
> I need to compile my itk code with "purify" to test for 
> memory leaks. Could
> someone please point me to some documentation about how to do 
> it ? I was
> unable to find information on the itk website.
> 
> Thanks,
> Suyash.
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>