NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
SEE ALSO
AUTHOR

NAME

chkalloc - search for leaks in output from diagnostic allocators

SYNOPSIS

prog 2>&1 | chkalloc

DESCRIPTION

This application scans error output from prog. prog should manage memory only with MALLOC (3), CALLOC (3), REALLOC (3), and FREE (3), and it should be run with the MEM_DEBUG environment variable defined. When prog exits, chkalloc prints a list of any allocations that were never freed. These are possible memory leaks. If environment variable CHKALLOC_WARN is set to 1, and chkalloc receives no input, it prints a warning and returns 2.

RETURN VALUES

0 if input shows no evidence of memory leaks.
1 if input shows evidence of memory leaks.
2 if no input and CHKALLOC_WARN is set to 1.

SEE ALSO

MALLOC (3), CALLOC (3), REALLOC (3), FREE (3)

AUTHOR

Gordon Carrie (dev0 at this site)