From owner-freebsd-current Thu Aug 6 09:10:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA29647 for freebsd-current-outgoing; Thu, 6 Aug 1998 09:10:06 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from vortex.starix.net (vortex.starix.net [208.219.83.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA29573 for ; Thu, 6 Aug 1998 09:09:59 -0700 (PDT) (envelope-from syko@sykotik.org) Received: from localhost (syko@localhost) by vortex.starix.net (8.7.6/8.7.3) with SMTP id MAA08630; Thu, 6 Aug 1998 12:07:04 -0400 X-Authentication-Warning: vortex.starix.net: syko owned process doing -bs Date: Thu, 6 Aug 1998 12:07:04 -0400 (EDT) From: Dusk Auriel Sykotik X-Sender: syko@vortex.starix.net To: Bruce Evans cc: dg@root.com, narvi@haldjas.folklore.ee, freebsd-current@FreeBSD.ORG, freebsd@xaa.iae.nl Subject: Re: memory leaks in libc In-Reply-To: <199808061335.XAA23389@godzilla.zeta.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Apache uses them quite frequently. And this could make it very costly on large webservers. Where I work, we have hundreds of connections to some of our webservers per minute. We also use cgi scripts very frequently, and these use *env* functions quite frequently as well. /* * Matt Harris +++ Syko * BPSOFH, BIOFH, C, SQL, PERL +++ http://starix.technonet.net/~syko/ * FreeBSD SysAdmin +++ apocalypse.sykotik.org */ On Thu, 6 Aug 1998, Bruce Evans wrote: > > Perhaps Bruce is suggesting that a seperate array be allocated to keep > >track of whether or not an env pointer was malloced? This would be very > >costly and, IMO, not worth it considering how rarely memory is lost by > >not freeing previously malloced strings. > > Erm, this would be quite cheap, considering how rarely the environment is > updated except by programs that want to demonstrate leaks in it. Most > programs don't even reference putenv() or getenv(). Shells shouldn't > use them because they might be too slow. > > Bruce > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message