Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Apr 2004 09:16:09 -0500
From:      Jon Noack <noackjr@alumni.rice.edu>
To:        Tai-hwa Liang <avatar@mmlab.cse.yzu.edu.tw>
Cc:        current@freebsd.org
Subject:   Re: /usr/bin/less weird memory consumption?
Message-ID:  <40813C29.9040000@alumni.rice.edu>
In-Reply-To: <040417111109E.70184@www.mmlab.cse.yzu.edu.tw>
References:  <040416140449E.61901@www.mmlab.cse.yzu.edu.tw> <408098A7.6090407@omut.org> <040417111109E.70184@www.mmlab.cse.yzu.edu.tw>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/16/2004 10:13 PM, Tai-hwa Liang wrote:
> On Fri, 16 Apr 2004, Alex Vasylenko wrote:
>> Tai-hwa Liang wrote:
>>> Anyone tried to view a file contains *hugh* line with
>>> /usr/bin/less in -CURRENT?
>>> 
>>> Sample file:
>>> 
>>> 	dd if=/dev/zero bs=512 count=1500 | tr '\00' ' ' > test.txt
>>> 
>>> On my -CURRENT box cvsup'd this morning, "/usr/bin/less text.txt"
>>> consumes about 511 MBytes of memory(see 'top'). -STABLE(less 358)
>>> and less 381 on Debian doesn't seem to have such problem, though.
>> 
>> There's a memory leak. The latest less (382) doesn't have this
>> problem. Use attached patch.
> 
> That works like a charm! Any chance would this patch being committed
> into the tree?

It looks like less v381 was just imported and contains the fix.  See
revision 1.1.1.4:
http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/less/line.c

Jon Noack



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40813C29.9040000>