bug-gawk
[Top][All Lists]
Advanced

[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: Thu, 30 Mar 2017 08:56:18 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

I think that's probably true, but my concern is based on some strange results
in the REPORT_1MM.txt and REPORT_2MM.txt valgrind logs. In both cases, only 800
NODE objects are allocated, but at exit, the 1MM case reports "in use at exit:
5,749,914 bytes in 59,366 blocks", whereas the 2MM case says "in use at exit:
11,416,868 bytes in 118,397 blocks".  So we have an extra 59,031 blocks in use,
but what are they if not NODEs or BUCKETs?

It seems impossible to answer that question unless Stephane runs valgrind in
those 2 cases with --show-reachable=yes.

Regards,
Andy

On Thu, Mar 30, 2017 at 01:04:22AM -0600, address@hidden wrote:
> Make that 263 meg.  Just checked.
> 
> I am comfortable that we don't have a true memory leak.
> 
> It's on my TODO list to try to reduce the overhead of array storage, but
> that won't be in time for the next release.
> 
> Thanks,
> 
> Arnold
> 
> address@hidden wrote:
> 
> > "Andrew J. Schorr" <address@hidden> wrote:
> >
> > > You might need to run valgrind with --leak-check=full 
> > > --show-reachable=yes to
> > > get to the bottom of this. I don't see any obvious leaks when I run that 
> > > on the
> > > 344-record file that you sent.
> >
> > That would be helpful.
> >
> > I ran gawk on a ~ 20 megabyte file and it hit a steady size as shown by
> > top. I think that there aren't any real leaks here. Valgrind is generally
> > good about reporting real leaks as "definitely lost" and I have yet to
> > see that in this instance.
> >
> > It may be that we could reduce gawk's memory usage for arrays, but
> > that's a different issue from a leak.
> >
> > Thanks,
> >
> > Arnold



reply via email to

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