[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
memory leak changing IGNORECASE (gawk 3.1.1)
From: |
Ian D |
Subject: |
memory leak changing IGNORECASE (gawk 3.1.1) |
Date: |
Sat, 12 Oct 2002 22:08:22 -0600 |
I have a complex script that runs through a series of regex tests for every
record read. The regex expressions are parsed from a config file and stored
in variables. For each expression tested, IGNORECASE is set to a variable
that is 0 or 1 depending on whether the match should ignore case. After the
test, IGNORECASE is set back to 0. When running this script, memory usage
continually increases until swap space is exhausted. I then commented out
the first IGNORECASE and retained the second, and I have the same problem.
Here is a snippet, inside of a for loop (for each fpatt in an array), which
is invoked for every record read.
#IGNORECASE=icase
fieldok=fnot ? ($fnum !~ fpatt) : ($fnum ~ fpatt)
IGNORECASE=0
But if you comment out IGNORECASE=0, the memory is static, even for millions
of input records.
The error I get is "gawk: cmd. line:139: (FILENAME=- FNR=312911) fatal:
Memory exhausted." I then modified source and determined that the line
printing this error is dfa.c:193. Line 139 is the IGNORECASE=0 line.
I have seen references in the ChangeLog similar to this problem, but
apparently it isn't fixed. Any ideas on how to fix this is appreciated.
Thanks,
Ian
- memory leak changing IGNORECASE (gawk 3.1.1),
Ian D <=