/ Installation / Fundamentals / Production / Tutorials / Software / Home
1.6.1 Testing: Dmalloc
Section 1.6.1: Dmalloc
Dmalloc and Purify are used to test our software. These are debugging tools that are useful for tracking down memory leaks, memory access violations, and other memory related errors. Detailed information on these tools can be found on the Dmalloc homepage and the Purify product page on the Rational website.

The Dmalloc library works as a replacement for the system's standard memory management routines, such as malloc, realloc, calloc, etc. Assuming dmalloc is correctly installed and configured on your system, follow the steps shown below to build the software for use with the dmalloc library.
  1. Change to the directory you made when you initialized your repository:

      cd isip/class/system

       
  2. Before running any other tests with Dmalloc, the system library needs to be built and installed with Dmalloc linked in. To do this, execute the following commands:
  3. Now change to the directory containing the part of the code you wish to test (for example, class/math/) and execute the following commands:
  4. It is also possible to test the entire system at once. To do this, change to the root directory of your repository and and execute the following commands. These commands will run a set of diagnostics and output memory information on the code in the directory and subdirectories they are run from. It may be convenient to redirect the output to a text file by appending "> output" to the end of the final command, where "output" is the name of the file you wish to save the output to. The output will look similar to the sample output for the make DEBUG="-g -dmalloc" test command shown above. For more information on Dmalloc, see the Dmalloc homepage.
   
Table of Contents   Section Contents   Previous Page Up Next Page
      Glossary / Help / Support / Site Map / Contact Us / ISIP Home