PurifyPlus is a
memory debugger
A memory debugger is a debugger for finding software memory problems such as 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 garba ...
program used by
software
Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications.
The history of software is closely tied to the development of digital comput ...
developers to detect memory access errors in programs, especially those written in
C or
C++. It was originally written by
Reed Hastings
Wilmot Reed Hastings Jr. (born October 8, 1960) is an American billionaire businessman. He is the co-founder and chairman of Netflix, Inc., which provides the Netflix streaming service. Hastings serves on a number of boards and works with various ...
of
Pure Software
Pure Software was founded in October 1991 by Reed Hastings, Raymond Peck and Mark Box. The original product was a debugging tool for UNIX software applications written in C called Purify (software), Purify. After adding new products such as Qua ...
.
Purify: fast detection of memory leaks and access errors.
by Reed Hastings and Bob Joyce, Usenix Winter 1992 technical conference. Pure Software later merged with Atria Software to form Pure Atria Software, which in turn was later acquired by Rational Software
Rational Machines is an enterprise 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. It changed its n ...
, which in turn was acquired by IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
, and then divested to UNICOM Systems, Inc. on Dec 31, 2014. It is functionally similar to other memory debuggers, such as Insure++, Valgrind
Valgrind () is a programming tool for memory debugging, memory leak detection, and profiling.
Valgrind was originally designed to be a freely licensed memory debugging tool for Linux on x86, but has since evolved to become a generic framework ...
and BoundsChecker
BoundsChecker is a memory checking and API call validation tool used for C++ software development with Microsoft Visual C++. It was created by NuMega in the early 1990s. When NuMega was purchased by Compuware in 1997, BoundsChecker became part o ...
.
Overview
PurifyPlus allows dynamic verification, a process by which a program discovers errors that occur when the program runs, much like a debugger
A debugger is a computer program used to test and debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, step through code line by line, and display ...
. Static verification or static code analysis
In computer science, static program analysis (also known as static analysis or static simulation) is the analysis of computer programs performed without executing them, in contrast with dynamic program analysis, which is performed on programs duri ...
, by contrast, involves detecting errors in the source code
In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.
Since a computer, at base, only ...
without ever compiling or running it, just by discovering logical inconsistencies. The type checking
In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a ''type'' (for example, integer, floating point, string) to every '' term'' (a word, phrase, or other set of symbols). Usu ...
by a C compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
is an example of static verification.
When a program is linked with PurifyPlus, corrected verification code is automatically inserted into the executable by parsing and adding to the object code
In computing, object code or object module is the product of an assembler or compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' ...
, 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. PurifyPlus also detects memory leak
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in a way that memory which is no longer needed is not released. A memory leak may also happen when an objec ...
s. By default, a leak report is generated at program exit but can also be generated by calling the PurifyPlus leak-detection API from within an instrumented application.
The errors that PurifyPlus 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 PurifyPlus helps by detecting these errors and telling the programmer exactly where they occur. Because PurifyPlus works by instrumenting all the object code
In computing, object code or object module is the product of an assembler or compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' ...
, it detects errors that occur inside of third-party or operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
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
In computer science, a data structure is a data organization and storage format that is usually chosen for efficient access to data. More precisely, a data structure is a collection of data values, the relationships among them, and the functi ...
used by the libraries. These are often the most difficult errors to find and fix.
Differences from traditional debuggers
The ability to detect non-fatal errors is a major distinction between PurifyPlus and similar programs from the usual debugger
A debugger is a computer program used to test and debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, step through code line by line, and display ...
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. Debuggers are useful for other things that PurifyPlus 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.
PurifyPlus also includes other functionality, such as high-performance watchpoints, which are of general use while using a debugger on one's code.
Using PurifyPlus makes the most sense in programming languages that leave memory management to the programmer. Hence, in Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, Lisp
Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation.
Originally specified in the late 1950s, ...
, or Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to:
* Visual Basic (.NET), the current version of Visual Basic launched in 2002 which runs on .NET
* Visual Basic (classic), the original Visual Basic suppo ...
, for example, automatic memory management reduces occurrence of any memory leak
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in a way that memory which is no longer needed is not released. A memory leak may also happen when an objec ...
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
Supported Java/.NET platforms
See also
* Memory debugger
A memory debugger is a debugger for finding software memory problems such as 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 garba ...
* Programming tool
A programming tool or software development tool is a computer program that is used to develop another computer program, usually by helping the developer manage computer files. For example, a programmer may use a tool called a source code editor ...
* Dynamic memory
* Memory leak
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in a way that memory which is no longer needed is not released. A memory leak may also happen when an objec ...
References
External links
"A Survey of Systems for Detecting Serial Run-Time Errors" by The Iowa State University’s High Performance Computing Group
{{DEFAULTSORT:Purify
Debuggers
Memory management software
Purify
Divested IBM products