[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: memory leak changing IGNORECASE (gawk 3.1.1)
From: |
Ian D |
Subject: |
Re: memory leak changing IGNORECASE (gawk 3.1.1) |
Date: |
Sat, 12 Oct 2002 22:52:30 -0600 |
Here is more info, I have a traceback.
=>[1] _kill(0x0, 0x6, 0x0, 0xffffffff, 0x6ecc0, 0xff1b5798), at 0xff21c534
[2] abort(0xff23a000, 0x2090bc8, 0x2087088, 0x0, 0x1, 0x208f584), at
0xff1b587
c
[3] xmalloc(0x400, 0x4, 0x2087128, 0xff23a000, 0x239d8, 0xff1c272c), at
0x23ee
c
[4] build_state(0x1, 0x208f584, 0x0, 0x4, 0x0, 0x35478), at 0x286c4
[5] dfaexec(0x8d80c, 0x6d000, 0x8d881, 0x1, 0xffbebc4c, 0xa), at 0x29a48
[6] research(0x208f558, 0x8d808, 0x0, 0x79, 0x1, 0xa), at 0x3636c
[7] re_parse_field(0x0, 0x6d06c, 0x79, 0x72568, 0x208f558, 0x2b34c), at
0x2be1
8
[8] get_field(0x4, 0x0, 0x6b000, 0x0, 0x0, 0x0), at 0x2c718
[9] r_get_lhs(0x8c6b8, 0x0, 0x1, 0x9f9e8, 0x239b0, 0x35478), at 0x48db4
[10] r_tree_eval(0x7a4c0, 0x0, 0x7a4c0, 0x20870e0, 0x0, 0x208ce34), at
0x4658c
[11] match_op(0x7a510, 0x60, 0x58800, 0xff23a000, 0x239d8, 0xff1c272c), at
0x4
8ff4
[12] r_tree_eval(0x7a510, 0x0, 0x1, 0xce, 0x239b0, 0x35478), at 0x46744
[13] r_tree_eval(0x7a510, 0x0, 0x0, 0x17, 0x6b000, 0x1751c), at 0x46734
[14] r_tree_eval(0x7a560, 0x0, 0x7a588, 0x6b000, 0x6b000, 0xa), at 0x46850
[15] interpret(0x7a588, 0x8, 0x88, 0x6b000, 0x6b000, 0x36328), at 0x46154
[16] interpret(0x1, 0x45540, 0x6b000, 0x0, 0x0, 0x0), at 0x4520c
[17] interpret(0x7a740, 0x8, 0x90, 0x6b000, 0x6b000, 0xff1c18ac), at
0x4557c
[18] interpret(0x1, 0x45540, 0x6b000, 0x0, 0x0, 0x0), at 0x4520c
[19] interpret(0x7d378, 0x8, 0x79, 0x6b000, 0x6b000, 0x8d808), at 0x4557c
[20] interpret(0x1, 0x45130, 0x0, 0xce, 0x6b000, 0x6d800), at 0x4520c
[21] interpret(0x1, 0x2ebbc, 0x0, 0x17, 0x6b000, 0x1751c), at 0x4519c
[22] do_input(0x6a800, 0x0, 0x72928, 0xc8, 0x0, 0x1), at 0x2ebdc
[23] main(0x6a800, 0x6a800, 0x32c94, 0x6d918, 0x0, 0x0), at 0x336e8
----- Original Message -----
From: "Ian D" <address@hidden>
To: <address@hidden>
Sent: Saturday, October 12, 2002 10:08 PM
Subject: memory leak changing IGNORECASE (gawk 3.1.1)
> 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
>