From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,1e90f463041f95df X-Google-Attributes: gidf678f,public X-Google-Thread: fee84,1e90f463041f95df X-Google-Attributes: gidfee84,public From: grunwald@foobar.cs.colorado.edu (Dirk Grunwald) Subject: Re: Looking for "Purify"? Date: 1995/10/03 Message-ID: #1/1 X-Deja-AN: 116959779 references: <44rguo$ige@uranium.chem> <44rmrk$50u@dual.crhc.uiuc.edu> organization: University of Colorado at Boulder reply-to: grunwald@foobar.cs.colorado.edu newsgroups: comp.unix.osf.osf1,comp.unix.osf.misc >>>>> "TK" == Tom Kraljevic writes: In article <44rmrk$50u@dual.crhc.uiuc.edu> tomk@dual.crhc.uiuc.edu (Tom Kraljevic) writes: TK> drew@mtu.edu (Andrew Benson) writes: >> Hi, >> There's a program available for Suns called "purify" which is a >> library that you link with that does all kinds of neat checking >> against your code, watches mallocs and frees and so forth. >> Basically it helps find memory leaks and things like that. >> Anyway, does anyone know of a similar program available for DEC >> OSF1 3.2? Or even DEC UNIX? >> Thanks, >> Andrew Benson (bensona@metamor.com) TK> I highly recommend Purify from Pure Software. However, it's not TK> free, and it probably doesn't exist for OSF/1//Digital Unix. -- I don't think Purify is available, but if you install the ATOM subset on the OSF/1 CDrom, you can use the '3rd' (third degree) program, which does pretty much everything Purify does, and it's free. Only runs on Alpha, though. Man page follows (this is actually for a more recent version than you're likely to find on a CDrom). third(5) third(5) NAME third - Performs memory access checks and detects memory leaks SYNOPSIS atom application_program -tool third [-env environment] [-toolargs=arg1, arg2,...] [atom_flags...] PARAMETERS application_program File name of a fully linked shared or nonshared executable to be examined. FLAGS -tool third Identifies the Third Degree tool to atom. -env environment Identifies any special environment. You can invoke the Third Degree tool for a threaded application program by specifying the threads environment. You can invoke third for a general-purpose environment by omitting the -env flag. -toolargs=arg1, arg2,... Passes arguments to the Third Degree tool's instrumentation routine. The instrumentation routine take (int argc, char **argv) as arguments. atom_flags Specifies flags to the atom command. See the atom(1) reference page for descriptions of other flags accepted by the atom command. DESCRIPTION The Third Degree tool performs memory access checks and memory leak detec- tion of C and C++ programs at run-time. The instrumented application is larger than the original application, runs exactly like it --just slower-- and, in addition, logs all errors and requested reports. This instrumented program locates most occurrences of the worst types of bugs in C and C++ programs: array overflows, memory smashing, and errors in the use of malloc and free. It also helps you determine the allocation habits of your application by listing the heap and finding memory leaks. For example, using the Third Degree tool, a program trying to free the same object twice generates the following output: ---------------------------------------- pid=3878 --- fof ---- 3 -- Freeing already freed memory in heap at 0x140038010 at byte 0 of 32-byte block at 0x140038010 - main ex.c, line 21 This block was allocated by malloc at - Booboo ex.c, line 10 - main ex.c, line 20 This block was freed at - Booboo ex.c, line 14 - main ex.c, line 20 Third Degree takes as input a user-specified customization file named .3rd. This customization file allows you to enables and disable error detection and reporting. The output of the tool is placed in file with .3log as a suffix. FILES prog.3rd instrumented version of prog prog.3log log of memory errors, leaks, and other reports .3rd customization file for 3rd RELATED INFORMATION atom(1) Programmer's Guide delim off