From owner-freebsd-current Thu Aug 6 06:36:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA06685 for freebsd-current-outgoing; Thu, 6 Aug 1998 06:36:24 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA06666 for ; Thu, 6 Aug 1998 06:36:12 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id XAA23389; Thu, 6 Aug 1998 23:35:45 +1000 Date: Thu, 6 Aug 1998 23:35:45 +1000 From: Bruce Evans Message-Id: <199808061335.XAA23389@godzilla.zeta.org.au> To: dg@root.com, narvi@haldjas.folklore.ee Subject: Re: memory leaks in libc Cc: bde@zeta.org.au, freebsd-current@FreeBSD.ORG, freebsd@xaa.iae.nl Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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