bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk


From: Andrew J. Schorr
Subject: Re: [bug-gawk] Increased RAM memory usage in gawk 5.0.1 compared to gawk 4.1.4
Date: Thu, 29 Aug 2019 08:56:42 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Thu, Aug 29, 2019 at 01:15:40AM -0600, address@hidden wrote:
> THANK YOU for the analysis and detective work.  Pretty amzaing.

You're welcome. It sucked up my afternoon, despite my intentions to
do other work.

> > OK. On 3rd thought, I think the attached patch fixes the problem and
> > is safer than the 1st version. I think this one is a winner.
> 
> There are some cases I'd like to test for that patch. I hope I
> can find some time.

OK.

> Below is a patch that reverts this change. For me it fixes the issue
> on master.

At the cost of hurting performance, which is why I got rid of that
needless copy in the 1st place.

> Andy - how does this jive with the analysis you did? It looks to me
> like the original code, which this goes back to, made a new copy of
> the field, that was used for the regex match, and that is what was
> freed by the code as it stands now.
> 
> It'd be nice to be sure we've fixed this in a fundamental way.

The old code was copying everything like crazy, which was safe,
but was hurting performance. To truly understand why one leaks memory
and the other doesn't will require me to go back into the debugger and/or
add print statements to chase it down. I will try to find time to do
that later.

Regards,
Andy



reply via email to

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