3 # xleaktrace - print unfreed memory using input generated by compact malloc
4 # tracing (malloc_set_trace(1))
6 # NOTE: we ignore `realloc' tags because they're just extra information
8 # Copyright (c) 2001 Chester Ramey
9 # Permission is hereby granted to deal in this Software without restriction.
10 # THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
26 # printf "allocated: %s %d %d %s %d\n", $2, alloc[$2], size[$2], file[$2], line[$2];
32 # printf "freed: %s %d\n", $2, alloc[$2];
34 printf "freeing unallocated pointer: %s\n", $2;
39 printf "unfreed memory\n";
41 if (alloc[ptr] == 1) {
42 printf "%s (%d) from %s:%d\n", ptr, size[ptr], file[ptr], line[ptr];