Purify
Encyclopedia
See also Purification (disambiguation) for the sense of refining
Refining
Refining is the process of purification of a substance or a form. The term is usually used of a natural resource that is almost in a usable form, but which is more useful in its pure form. For instance, most types of natural petroleum will burn straight from the ground, but it will burn poorly...

.


Purify is a memory debugger
Memory debugger
A memory debugger is a programming tool for finding memory leaks and buffer overflows. These are due to bugs related to the allocation and deallocation of dynamic memory. Programs written in languages that have garbage collection, such as managed code, might also need memory debuggers, e.g...

 program used by software developers to detect memory access errors in programs, especially those written in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 or C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

. It was originally written by Reed Hastings
Reed Hastings
Wilmot Reed Hastings, Jr. is an entrepreneur and education philanthropist. He is the CEO of Netflix, and on the boards of Microsoft, Facebook, and numerous non-profit organizations.- Early life and education :...

 of Pure Software
Pure Software
Pure Software was founded in October 1991 by Reed Hastings and Mark Box. The original product was a debugging tool for Unix/C engineers called Purify. After adding new products such as Quantify and PureLink, and doubling its revenue every year for four years, Pure Software went public with the...

. Pure Software later merged with Atria Software to form Pure Atria Software, which in turn was later acquired by Rational Software
Rational Software
Rational Machines was founded by Paul Levy and Mike Devlin in 1981 to provide tools to expand the use of modern software engineering practices, particularly explicit modular architecture and iterative development...

, which in turn was acquired by IBM
IBM
International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...

. It is functionally similar to other memory debuggers, such as Insure++
Insure++
Insure++ is a memory debugger computer program, used by software developers to detect various errors in programs written in C and C++. It is made by Parasoft, and is functionally similar to other memory debuggers, such as Purify and Valgrind.-Overview:...

, Valgrind
Valgrind
Valgrind is a GPL licensed programming tool for memory debugging, memory leak detection, and profiling. The name valgrind comes from the main entrance to Valhalla in Norse mythology....

 and BoundsChecker
BoundsChecker
BoundsChecker is a memory checking and API call validation tool used for C++ software development with Microsoft Visual C++. It was created by Nu-Mega Technologies in the early 1990s. When Nu-Mega was purchased by Compuware in 1997, BoundsChecker became part of a larger tool suite, DevPartner...

.

Overview

Purify allows dynamic verification, a process by which a program discovers errors that occur when the program runs, much like a debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

. Static verification or static code analysis
Static code analysis
Static program analysis is the analysis of computer software that is performed without actually executing programs built from that software In most cases the analysis is performed on some version of the source code and in the other cases some form of the object code...

, by contrast, involves detecting errors in the source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...

 without ever compiling or running it, just by discovering logical inconsistencies. The type checking by a C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 is an example of static verification.

When a program is linked with Purify, corrected verification code is automatically inserted into the executable by parsing and adding to the object code
Object code
Object code, or sometimes object module, is what a computer compiler produces. In a general sense object code is a sequence of statements in a computer language, usually a machine code language....

, including libraries. That way, if a memory error occurs, the program will print out the exact location of the error, the memory address involved, and other relevant information. Purify also detects memory leak
Memory leak
A memory leak, in computer science , occurs when a computer program consumes memory but is unable to release it back to the operating system. In object-oriented programming, a memory leak happens when an object is stored in memory but cannot be accessed by the running code...

s. By default, a leak report is generated at program exit but can also be generated by calling the Purify leak-detection API from within an instrumented application.

The errors that Purify discovers include array bounds reads and writes, trying to access unallocated memory, freeing unallocated memory (usually due to freeing the same memory for the second time), as well as memory leaks (allocated memory with no pointer reference). Most of these errors are not fatal (at least not at the site of the error), and often when just running the program there is no way to detect them, except by observing that something is wrong due to incorrect program behavior. Hence Purify helps by detecting these errors and telling the programmer exactly where they occur. Because Purify works by instrumenting all the object code
Object code
Object code, or sometimes object module, is what a computer compiler produces. In a general sense object code is a sequence of statements in a computer language, usually a machine code language....

, it detects errors that occur inside of third-party or operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

 libraries. These errors are often caused by the programmer passing incorrect arguments to the library calls, or by misunderstandings about the protocols for freeing data structures used by the libraries. These are often the most difficult errors to find and fix.

Differences with traditional debuggers

The ability to detect non-fatal errors is a major distinction between Purify and similar programs from the usual debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

s. By contrast, debuggers generally only allow the programmer to quickly find the sources of fatal errors, such as a program crash due to dereferencing a null pointer, but do not help to detect the non-fatal memory errors. Debugger
Debugger
A debugger or debugging tool is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which...

s are useful for other things that Purify is not intended for, such as for stepping through the code line by line or examining the program's memory by hand at a particular moment of execution. In other words, these tools can complement each other for a skilled developer.

Purify also includes other functionality, such as high-performance watchpoints
Breakpoint
In software development, a breakpoint is an intentional stopping or pausing place in a program, put in place for debugging purposes. It is also sometimes simply referred to as a pause....

, which are of general use while using a debugger on one's code.

It is worth noting that using Purify makes the most sense in programming languages that leave memory management to the programmer. Hence, in Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

, Lisp
Lisp programming language
Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized syntax. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today; only Fortran is older...

, or Visual Basic
Visual Basic
Visual Basic is the third-generation event-driven programming language and integrated development environment from Microsoft for its COM programming model...

, for example, automatic memory management reduces occurrence of any memory leak
Memory leak
A memory leak, in computer science , occurs when a computer program consumes memory but is unable to release it back to the operating system. In object-oriented programming, a memory leak happens when an object is stored in memory but cannot be accessed by the running code...

s. These languages can however still have leaks; unnecessary references to objects will prevent the memory from being re-allocated. IBM has a product called Rational Application Developer to uncover these sorts of errors.

Supported platforms

Supported C/C++ Platforms
Operating System Processor Architectures Operating System versions Compilers Debuggers Miscellaneous
Solaris
Sun UltraSPARC Solaris 10 base through 5/09
Solaris 9 base through 9/05
Solaris 8 base through 2/04
Sun C/C++ 5.3 through 5.10
GNU gcc/g++ 4.0 through 4.4
GNU gcc/g++ 3.0 through 3.4
Sun dbx 7.0 through 7.7
Sun dbx 6.2
GNU gdb 6.0 through 6.7
Solaris threads
POSIX kernel threads
Solaris ld 5.8 through 5.10
AMD64
Intel 64
Solaris 10 6/06 through 5/09 Sun C/C++ 5.8 through 5.10
GNU gcc/g++ 4.0 through 4.4
GNU gcc/g++ 3.4
Sun dbx 7.5 through 7.7
GNU gdb 6.0 through 6.7
POSIX kernel threads
Solaris ld 5.10
Linux
Intel IA-32 RHEL 5 (Server/Desktop) base through 5.4
RHEL 4 (AS/ES/WS) base through 4.8
RHEL 3 (AS/ES/WS) base through U9
SLES 11 base
SLES 10 base through SP2
SLES 9 base through SP4
GNU gcc/g++ 4.0 through 4.4
GNU gcc/g++ 3.2 through 3.4
Intel icc 11.0
GNU gdb 6.0 through 6.8 Native POSIX thread library (NPTL)
GNU ld 2.13 through 2.17
AMD64
Intel 64
RHEL 5 (Server/Desktop) base through 5.4
RHEL 4 (AS/ES/WS) base through 4.8
SLES 11 base
SLES 10 base through SP2
SLES 9 base through SP4
GNU gcc/g++ 4.0 through 4.4
GNU gcc/g++ 3.2 through 3.4
Intel icc 11.0
GNU gdb 6.0 through 6.8 Native POSIX thread library (NPTL)
GNU ld 2.13 through 2.17
AIX
IBM POWER5
IBM POWER6
AIX 6.1 base through TL3
AIX 5L v5.3 base through TL9
IBM XL C/C++ 10.1
IBM XL C/C++ 9.0
IBM XL C/C++ 8.0
IBM XL C/C++ 7.0
GNU gcc/g++ 3.4
IBM Debugger 6.0
IBM Debugger 5.0
GNU gdb 6.2
POSIX kernel threads
AIX ld 5.2 through 6.1
Windows
Intel IA-32 Vista Business base through SP2
Vista Enterprise base through SP2
Vista Ultimate base through SP2
XP Professional base through SP3
2000 Professional SP2 through SP4
2000 Server SP2 through SP4
2000 Advanced Server SP2 through SP4
Server 2003 Standard base through SP2
Server 2003 Enterprise base through SP2
Server 2003 R2 Standard base through SP2
Server 2003 R2 Enterprise base through SP2
Server 2008 Enterprise Edition base through SP2
Server 2008 Standard Edition base through SP2
Server 2008 DataCenter Edition base through SP2
Visual Studio 2008
Visual Studio 2005
Visual Studio .NET 2003
Visual Studio .NET
Visual Studio 6.0
Visual Studio 2008
Visual Studio 2005
Visual Studio .NET 2003
Visual Studio .NET
Visual Studio 6.0




Supported Java/.NET Platforms
Platform Data Collection Type Runtime Environment
Windows
Java data collection IBM JRE 1.4.2
IBM JRE 5.0
SUN JRE 1.4.2
SUN JRE 1.5.0
.NET data collection .NET Framework 1.0
.NET Framework 1.1 base through SP1
.NET Framework 2.0
.NET Framework 3.0, 3.5

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK