From owner-cvs-all Thu Jun 13 18:31:37 2002 Delivered-To: cvs-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 931) id B43B037B41D; Thu, 13 Jun 2002 18:31:32 -0700 (PDT) Date: Thu, 13 Jun 2002 18:31:32 -0700 From: Juli Mallett To: Maxim Sobolev Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/sed main.c Message-ID: <20020613183132.A74832@FreeBSD.ORG> References: <200206140128.g5E1Sqd34821@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5.1i In-Reply-To: <200206140128.g5E1Sqd34821@freefall.freebsd.org>; from sobomax@FreeBSD.org on Thu, Jun 13, 2002 at 06:28:52PM -0700 Organisation: The FreeBSD Project X-Alternate-Addresses: , , , X-Affiliated-Projects: FreeBSD, xMach, ircd-hybrid-7 X-Towel: Yes Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Maxim Sobolev escriurères > sobomax 2002/06/13 18:28:52 PDT > > Modified files: > usr.bin/sed main.c > Log: > Fix one serious bug and one potential problem with in-place editing code: > > - original version of code worked incorrectly when more than one > input files were specified - it was moving the last line from the 1st file > to be the first line of the 2nd, last line of the 2nd to be the first > line of the 3rd and so on; > > - use mmap()->write() to create temporary file instead of > malloc()->read()->write(), which was not only slower, but also did not > bother to free allocated memory once backup file was created, potentially > leading to memory exhausting when regex is applied to a big file or a large > number of small ones. I'll let you handle MFC'ing -i and the manpage changes now. -- Juli Mallett FreeBSD: The Power To Serve Perception is prejudice / Don't classify me / Accept me as me / Not what you see To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message