head	1.1;
branch	1.1.1;
access;
symbols
	tn_m001:1.1.1.1
	final_interface:1.1.1.1
	start:1.1.1.1
	oc:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2001.05.18.11.20.30;	author markom;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2001.05.18.11.20.30;	author markom;	state Exp;
branches;
next	;


desc
@@



1.1
log
@Initial revision
@
text
@#
#  Awk program to analyze mtrace.c output.
#
$1 == "+"	{ if (allocated[$2] != "")
		    print "+", $2, "Alloc", NR, "duplicate:", allocated[$2];
		  else
		    allocated[$2] = $3;
		}
$1 == "-"	{ if (allocated[$2] != "") {
		    allocated[$2] = "";
		    if (allocated[$2] != "")
			print "DELETE FAILED", $2, allocated[$2];
		  } else
		    print "-", $2, "Free", NR, "was never alloc'd";
		}
$1 == "<"	{ if (allocated[$2] != "")
		    allocated[$2] = "";
		  else
		    print "-", $2, "Realloc", NR, "was never alloc'd";
		}
$1 == ">"	{ if (allocated[$2] != "")
		    print "+", $2, "Realloc", NR, "duplicate:", allocated[$2];
		  else
		    allocated[$2] = $3;
		}

# Ignore "= Start"
$1 == "="	{ }
# Ignore failed realloc attempts for now
$1 == "!"	{ }


END		{ for (x in allocated) 
		    if (allocated[x] != "")
		      print "+", x, allocated[x];
		}
@


1.1.1.1
log
@First version. Still unstable.
Basic functionallity should work. Use only dummy target.

@
text
@@
