chkalloc - search for leaks in output from diagnostic allocators
prog 2>&1 | chkalloc
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.
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.
MALLOC (3), CALLOC (3), REALLOC (3), FREE (3)
Gordon Carrie (dev0 at this site)