From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,287208fecd717815 X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,287208fecd717815 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1990-06-14 19:02:24 PST Path: gmdzi!unido!mcsun!uunet!snorkelwacker!apple!decwrl!shlump.nac.dec.com!hanoi.enet.dec.com!daniels From: daniels@hanoi.enet.dec.com (Bradford R. Daniels) Newsgroups: comp.sys.dec,comp.os.vms Subject: Re: VMS4.5 CRTL fstat does not free() malloc()ed memory (apparently) Keywords: fstat malloc free VAXCRTL memory Message-ID: <12498@shlump.nac.dec.com> Date: 14 Jun 90 20:53:50 GMT References: <1990Jun6.233823.16060@murdoch.acc.Virginia.EDU> Sender: newsdaemon@shlump.nac.dec.com Reply-To: daniels@hanoi.enet.dec.com (Bradford R. Daniels) Followup-To: comp.sys.dec Organization: Digital Equipment Corp. Xref: gmdzi comp.sys.dec:2533 comp.os.vms:24871 Posted: Thu Jun 14 21:53:50 1990 The problem is that fstat() calls getenv(), which allocates memory for its return value. There is a fixed version of getenv() which keeps around old results so that it doesn't need to allocate memory every time. It will be available in "a future release of VMS", no doubt... Your work-around is the best solution for now. - Brad ----------------------------------------------------------------- Brad Daniels | Digital Equipment Corp. almost DEC Software Devo | definitely wouldn't approve of "VAX C RTL Whipping Boy" | anything I say here...