From owner-freebsd-current Thu Aug 6 01:58:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA28072 for freebsd-current-outgoing; Thu, 6 Aug 1998 01:58:15 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from caladan.tdx.co.uk (caladan.tdx.co.uk [195.188.177.4]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA28066 for ; Thu, 6 Aug 1998 01:58:13 -0700 (PDT) (envelope-from kpielorz@tdx.co.uk) Received: from tdx.co.uk (lorca-tx.tdx.co.uk [195.188.177.242]) by caladan.tdx.co.uk (8.9.1/8.9.1) with ESMTP id JAA12636; Thu, 6 Aug 1998 09:57:54 +0100 (BST) Message-ID: <35C9702B.87B3ED7D@tdx.co.uk> Date: Thu, 06 Aug 1998 09:58:19 +0100 From: Karl Pielorz Organization: TDX X-Mailer: Mozilla 4.5b1 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Mark Huizer CC: freebsd-current@FreeBSD.ORG Subject: Re: memory leaks in libc References: <19980806100859.A312@xaa.iae.nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I think I've seen this conversation before... It came up a while ago... I think it is well know, and apparently very hard to fix... Somone did offer to fix it, but then declined once it was pointed out exactly how hard it would be to do... ;-) I think it has something to do with shared memory allocation between shell's - i.e. exported environment strings or something... No doubt someone who knows what there talking about will explain it in all it's gory details why it's not so easy to fix... ;-) Regards, Karl Mark Huizer wrote: > > Hi, a nice user of ours pointed me to the fact that various functions > like setenv, putenv etc leak memory like crazy. To mention a very > simple example: > > main(){while(1){setenv("A","AA",1);setenv("A","A",1);}} > > while consume all memory within short periods of time (see setenv.c for > the reason). > > Is this wellknown? I think it is bad, and would like to fix it > > Mark > -- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message