[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Memory leak
From: |
Andrew J. Schorr |
Subject: |
Re: [bug-gawk] Memory leak |
Date: |
Tue, 28 Mar 2017 15:15:11 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Mar 28, 2017 at 12:21:22PM -0600, address@hidden wrote:
> Thanks. I note that there are no 'definitely lost' leaks. I tend to
> mistrust the 'possibly lost' reports as fals positives, but I'm willing
> to put some time in reviewing the code.
Agreed. I guess the question is whether we are somehow leaking NODE
or BUCKET structures. I applied the attached patch to more_blocks
to show when allocations occur, but I couldn't learn anything definitive
from such a small dataset.
For a single input record, it allocates 800 NODEs and 400 BUCKETs:
bash-4.2$ tail -n +2 sample4gnu.pip | head -1 | gawk -f test.awk | wc
debug: more_blocks(1) allocated 100; total 100
debug: more_blocks(2) allocated 100; total 100
debug: more_blocks(1) allocated 100; total 200
debug: more_blocks(1) allocated 100; total 300
debug: more_blocks(2) allocated 100; total 200
debug: more_blocks(1) allocated 100; total 400
debug: more_blocks(1) allocated 100; total 500
debug: more_blocks(1) allocated 100; total 600
debug: more_blocks(2) allocated 100; total 300
debug: more_blocks(1) allocated 100; total 700
debug: more_blocks(2) allocated 100; total 400
debug: more_blocks(1) allocated 100; total 800
1 1 78
For the entire 344-record input file, it allocate 1200 NODEs and still 400
BUCKETs:
bash-4.2$ tail -n +2 sample4gnu.pip | gawk -f test.awk | wc
debug: more_blocks(1) allocated 100; total 100
debug: more_blocks(2) allocated 100; total 100
debug: more_blocks(1) allocated 100; total 200
debug: more_blocks(1) allocated 100; total 300
debug: more_blocks(2) allocated 100; total 200
debug: more_blocks(1) allocated 100; total 400
debug: more_blocks(1) allocated 100; total 500
debug: more_blocks(1) allocated 100; total 600
debug: more_blocks(2) allocated 100; total 300
debug: more_blocks(1) allocated 100; total 700
debug: more_blocks(2) allocated 100; total 400
debug: more_blocks(1) allocated 100; total 800
debug: more_blocks(1) allocated 100; total 900
debug: more_blocks(1) allocated 100; total 1000
debug: more_blocks(1) allocated 100; total 1100
debug: more_blocks(1) allocated 100; total 1200
344 344 103280
Regards,
Andy
more_blocks.patch
Description: Text document
- Re: [bug-gawk] Memory leak, (continued)
- Re: [bug-gawk] Memory leak, arnold, 2017/03/27
- Re: [bug-gawk] Memory leak, Andrew J. Schorr, 2017/03/27
- Re: [bug-gawk] Memory leak, Stephane Delsert, 2017/03/27
- Re: [bug-gawk] Memory leak, arnold, 2017/03/28
- Re: [bug-gawk] Memory leak, Andrew J. Schorr, 2017/03/28
- Re: [bug-gawk] Memory leak, arnold, 2017/03/28
- Re: [bug-gawk] Memory leak,
Andrew J. Schorr <=
- Re: [bug-gawk] Memory leak, Stephane Delsert, 2017/03/29
- Re: [bug-gawk] Memory leak, Andrew J. Schorr, 2017/03/29
- Re: [bug-gawk] Memory leak, arnold, 2017/03/29
- Re: [bug-gawk] Memory leak, arnold, 2017/03/30
- Re: [bug-gawk] Memory leak, Andrew J. Schorr, 2017/03/30
- Re: [bug-gawk] Memory leak, Stephane Delsert, 2017/03/30
- Re: [bug-gawk] Memory leak, Andrew J. Schorr, 2017/03/30
- Re: [bug-gawk] Memory leak, Stephane Delsert, 2017/03/30
- Re: [bug-gawk] Memory leak, Andrew J. Schorr, 2017/03/30
- Re: [bug-gawk] Memory leak, Stephane Delsert, 2017/03/31