Subject: CVS commit: pkgsrc/pkgtools/pkglint/files
To: None <pkgsrc-changes@NetBSD.org>
From: Roland Illig <firstname.lastname@example.org>
Date: 09/18/2006 10:07:21
Module Name: pkgsrc
Committed By: rillig
Date: Mon Sep 18 10:07:21 UTC 2006
Fixed a huge memory leak in pkglint. Checking the complete pkgsrc tree
took about 300 MB of memory. Now it takes 27 MB, which is still much,
but quite better.
The cause for the memory leak was that I wrote
my ($result) = @_;
my ($result) = ($1);
after successfully matching a regular expression. That way, pkglint
created some cyclic data structures, and since Perl does not have
garbage collection, these didn't get cleaned up.
Added some checks so that this cannot easily happen again. Also fixed
some other instances where @_ appeared in the source code.
To generate a diff of this commit:
cvs rdiff -r1.674 -r1.675 pkgsrc/pkgtools/pkglint/files/pkglint.pl
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.