From 19d2b70b5332a835e79e5165898b6552299c2aca Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 14 Dec 1999 02:07:27 +0000 Subject: [PATCH] checked in Perl script for tracking down memory leaks --- util/memleak.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 util/memleak.pl diff --git a/util/memleak.pl b/util/memleak.pl new file mode 100644 index 0000000000..1333485ba3 --- /dev/null +++ b/util/memleak.pl @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +# Massage the output from ISC_MEM_DEBUG to extract mem_get() calls +# with no corresponding mem_put(). + +while (<>) { + $gets{$1.$2} = $_ if /mem(pool)?_get.*-> 0x([0-9a-f]+)/; + delete $gets{$1.$2} if /mem(pool)?_put\(0x[0-9a-f]+, 0x([0-9a-f]+)/; +} +print join('', values %gets);