From owner-freebsd-current@FreeBSD.ORG Sat Apr 17 07:16:21 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A68216A4CE for ; Sat, 17 Apr 2004 07:16:21 -0700 (PDT) Received: from cmsrelay01.mx.net (cmsrelay01.mx.net [165.212.11.110]) by mx1.FreeBSD.org (Postfix) with SMTP id ECC1943D54 for ; Sat, 17 Apr 2004 07:16:20 -0700 (PDT) (envelope-from noackjr@alumni.rice.edu) Received: from uadvg128.cms.usa.net (165.212.11.128) by cmsoutbound.mx.net with SMTP; 17 Apr 2004 14:16:16 -0000 Received: from optimator.noacks.org [66.136.22.94] by uadvg128.cms.usa.net (ASMTP/noackjr@usa.net) via mtad (C8.MAIN.3.13N) with ESMTP id 077iDqoqm0296M28; Sat, 17 Apr 2004 14:16:12 GMT X-USANET-Auth: 66.136.22.94 AUTH noackjr@usa.net optimator.noacks.org Received: from localhost (localhost [127.0.0.1]) by optimator.noacks.org (Postfix) with ESMTP id 86471615A; Sat, 17 Apr 2004 09:16:11 -0500 (CDT) Received: from optimator.noacks.org ([127.0.0.1]) by localhost (optimator.noacks.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 86910-08; Sat, 17 Apr 2004 09:16:10 -0500 (CDT) Received: from alumni.rice.edu (optimator [192.168.1.11]) by optimator.noacks.org (Postfix) with ESMTP id 243F46103; Sat, 17 Apr 2004 09:16:10 -0500 (CDT) Message-ID: <40813C29.9040000@alumni.rice.edu> Date: Sat, 17 Apr 2004 09:16:09 -0500 From: Jon Noack User-Agent: Mozilla Thunderbird 0.5+ (Windows/20040312) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tai-hwa Liang References: <040416140449E.61901@www.mmlab.cse.yzu.edu.tw> <408098A7.6090407@omut.org> <040417111109E.70184@www.mmlab.cse.yzu.edu.tw> In-Reply-To: <040417111109E.70184@www.mmlab.cse.yzu.edu.tw> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at noacks.org cc: Alex Vasylenko cc: current@freebsd.org Subject: Re: /usr/bin/less weird memory consumption? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: noackjr@alumni.rice.edu List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2004 14:16:21 -0000 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