Xref: utzoo comp.sys.dec:3392 comp.os.vms:26725 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!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. Lines: 13 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...