Memory leak options

 

Option

Default

-inuse-at-exit

no

Specifies whether memory in use is reported at program exit. Memory in use is memory that has been allocated and to which there are still pointers.

Use -inuse-at-exit=yes to print in-use messages at exit.

 

 

-leaks-at-exit

yes

Specifies whether memory leaked is reported at program exit. Memory leaked is memory that has been allocated and to which there are no pointers.

Use -leaks-at-exit=no to suppress printing memory leak messages at exit.

 

 

-pointer-mask

0xffffffff (32-bit)
0xffffffffffffffff (64-bit)

Specifies a mask that lets Purify extract the correct value from custom pointers.

Normally, if your application ORs flags into the upper bits of heap pointers, Purify cannot follow them to the memory blocks they refer to and might incorrectly report leaks. For example, if you use the upper 4 bits of pointers for flags, you should use:

-pointer-mask=0x0fffffff

 

 

-pointer-offset

0

Tells Purify the size of the extra memory allocated by a custom malloc wrapper.

If you use a malloc wrapper that allocates extra memory for bookkeeping purposes over and above the size requested and returns an adjusted pointer past the extra memory allocated, Purify might incorrectly report memory in use as potential leaks (PLKs). This option ensures that Purify does not report false PLKs.

 

-search-mmaps

no

Purify automatically sets this option to yes if you use ObjectStore (OSCC).

Tells Purify to search for heap pointers in memory obtained from mmap. Use this option when using an object-oriented database such as ObjectStore, where mmap'd databases anchor many blocks of memory that would otherwise be reported as leaks.

 

-search-thread-stacks

no

Set this option to yes only if you are using the new leaks button or the purify_new_leaks API function in a multi-threaded program. The option instructs Purify to search thread stacks, in addition to the main stack,  for pointers into the heap, and so prevents Purify from reporting all memory allocated in threads as leaked.

By default, Purify searches only the main stack for memory leaks. This is appropriate if you are having Purify report leaks only after your program has exited, and are not using the "new leaks" capability:

 

Notes: