--- Begin Message ---
Subject: |
Gawk memory leak on match(s,r)? |
Date: |
Wed, 11 Jul 2007 16:10:32 +0200 |
User-agent: |
Internet Messaging Program (IMP) H3 (4.1.4) / FreeBSD-6.2 |
Hi,
I just applied the following small program to a 1G+ file, and the
memory used (as shown by top's VIRT or RES columns) kept growing,
and swapping started to slow down the whole system.
{
match($0,/ */);
}
My real prog is of course bigger, but this alone shows the problem. I
also noticed that adding a third parameter solves the problem, so:
{
match($0,/ */,t);
}
has normal behavior (i.e., constant memory usage), even though t is never
used. It looks like there's a memory leak somewhere, that appears only
on large files. I'm sure you'll find that easily.
This is gawk 3.15, on Ubuntu 7.04.
Thanks for this great awk.
-- Alain.
--- End Message ---
--- Begin Message ---
Subject: |
confirm d50b960b28cdccd2ba2c0b7f08e0ef9536ba4251 |
If you reply to this message, keeping the Subject: header intact,
Mailman will discard the held message. Do this if the message is
spam. If you reply to this message and include an Approved: header
with the list password in it, the message will be approved for posting
to the list. The Approved: header can also appear in the first line
of the body of the reply.
--- End Message ---