Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Aug 1998 12:07:04 -0400 (EDT)
From:      Dusk Auriel Sykotik <syko@sykotik.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        dg@root.com, narvi@haldjas.folklore.ee, freebsd-current@FreeBSD.ORG, freebsd@xaa.iae.nl
Subject:   Re: memory leaks in libc
Message-ID:  <Pine.LNX.3.95.980806120525.8578C-100000@vortex.starix.net>
In-Reply-To: <199808061335.XAA23389@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.980806120525.8578C-100000>