Re: memory leak detector, 2.0.32, patch

Ingo Molnar (mingo@pc7537.hil.siemens.at)
Tue, 2 Dec 1997 15:14:59 +0100 (MET)


> cat /proc/memleak | cut -c12- | sort | gawk -- 'BEGIN{Y=0;}//{if ($0 == \
> X) {Y=Y+1;} else {if (Y) printf ("%d\t %s\n", Y, X); Y=1;} X=$0}END{ \
> printf \ ("%d\t %s\n", Y, $0);}'

as some people have noticed, the script has a misplaced backslash, heres
the correct (cut&paste) script:

cat /proc/memleak | cut -c12- | sort | gawk -- 'BEGIN{Y=0;}//\
{if ($0 == X) {Y=Y+1;} else {if (Y) printf ("%d\t %s\n", Y, X); \
Y=1;} X=$0}END{ printf ("%d\t %s\n", Y, $0);}'

-- mingo