bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

memory leak in gawk 3.1.0


From: Tony Leneis
Subject: memory leak in gawk 3.1.0
Date: Thu, 2 May 2002 01:56:14 -0700
User-agent: Mutt/1.2.5i

        There's a rather nasty memory leak in gawk 3.1.0 when a next statement
is called from within a for (index in array) loop.  For example, this gawk
program eventually consumes over 100 megs after processing around 2 million
lines:

BEGIN {
  x[1] = 0
}
{
  for (i in x)
    next
}

I assume the for (i in x) construct must allocate some memory that isn't
freed when the loop is exited via the next statement.

-Tony

-- 
e-mail: address@hidden                 Computerized Vehicle Registration
phone : 503 402-3531                    2525 SW 1st Ave, Suite 450
FAX   : 503 294-1526                    Portland, OR 97201-4760



reply via email to

[Prev in Thread] Current Thread [Next in Thread]