Purify API functions

      To use Purify API functions, include       /purify.h in your code and link with             /purify_stubs.a.
 
      In Makefile, you should write as follow for C++:
      LINK_FLAGS = -      L/usr/local/rational/releases/purify.i386_linux 2.2003a .06.15/purify_staubs.a
LINK_PURIFY = purify –cache-dir=$(HOME)/.cache gcc       $(LINK_FLAGS)
      main.purify:$(OBJS)
       $(LINK_PURIFY) –lstdc++ -o main.purify $(OBJS)
 
Commonly used API functions
De.ion
int  purify_describe (char *addr)
Prints specific details about memory
int  purify_is_running (void)
Returns "TRUE" if the program is instrumented
int  purify_new_inuse (void)
Prints a message . all memory newly in use
int  purify_new_leaks (void)
Prints a message . all new leaks
int  purify_new_fds_inuse (void)
Lists the new open file de.ors
int  purify_printf (char *format, ...)
Prints formatted text to the Viewer or log-file
int  purify_watch (char *addr)
Watches for memory write, malloc, free
int  purify_watch_n (char *addr, int size, char *type)
Watches memory: type = "r", "w", "rw"
int  purify_watch_info (void)
Lists active watchpoints
int  purify_watch_remove (int watchno)
Removes a specified watchpoint
int  purify_what_colors (char *addr, int size)
Prints the color coding of memory
 
 

Purify messages

      Purify reports the following messages. For detailed, platform-specific information, see the Purify .line help system.
Message
De.ion
Severity*
Message
De.ion
Severity*
ABR
Array Bounds Read
W
NPR
Null Pointer Read
F
ABW
Array Bounds Write
C
NPW
Null Pointer Write
F
BRK
Misuse of Brk or Sbrk
C
PAR
Bad Parameter
W
BSR
Beyond Stack Read
W
PLK
Potential Leak( is memory that does not have a pointer to its beginning,but does have .e to its interior)
W
BSW
Beyond Stack Write
W
PMR
Partial UMR
W
COR
Core Dump Imminent
F
SBR
Stack Array Bounds Read
W
FIU
File De.ors In Use
I
SBW
Stack Array Bounds Write
C
FMM
Freeing Mismatched Memory
C
SIG
Signal
I
FMR
Free Memory Read
W
SOF
Stack Overflow
W
FMW
Free Memory Write
C
UMC
Uninitialized Memory Copy
W
FNH
Freeing Non Heap Memory
C
UMR
Uninitialized Memory Read
W
FUM
Freeing Unallocated Memory
C
WPF
Watchpoint Free
I
IPR
Invalid Pointer Read
F
WPM
Watchpoint Malloc
I
IPW
Invalid Pointer Write
F
WPN
Watchpoint Entry
I
MAF
Malloc Failure
I
WPR
Watchpoint Read
I
MIU
Memory In-Use
I
WPW
Watchpoint Write
I
MLK
Memory Leak
W
WPX
Watchpoint Exit
I
MRE
Malloc Reentrancy Error
C
ZPR
Zero Page Read
F
MSE
Memory Segment Error
W
ZPW
Zero Page Write
F
 
      * Message severity: F=Fatal, C=Corrupting, W=Warning, I=Informational