Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!pa.dec.com!bacchus!mwm From: mwm@pa.dec.com (Mike (My Watch Has Windows) Meyer) Newsgroups: comp.sys.amiga.programmer Subject: Re: free() in SAS C Message-ID: Date: 3 May 91 23:20:36 GMT References: <1991May02.143148.22732@edb.tih.no> <1991May03.225751.26999@medar.com> Sender: news@pa.dec.com (News) Distribution: comp Organization: Missionaria Phonibalonica Lines: 20 In-Reply-To: jseymour@medar.com's message of 3 May 91 22:57:51 GMT In article <1991May03.225751.26999@medar.com> jseymour@medar.com (James Seymour) writes: No. There is no ANSI compatable (or even *remotely* portable) way to return un-used memory to the system [other than process termination :-)]. Such a beast would be highly operating system and compiler dependent. Process termination might do the trick - after the setup, save state, start your second half, then exit. It's pretty striaghtforward to write a couple of routines that map malloc/free to AllocMem/FreeMem, which might be acceptable in this case. It'll give you the behavior wanted for the large hunks, anyway. If you're doing lots of frees/allocs later on, you'll take a performance hit.