Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!rphroy!teemc!sycom!ro-chp!chopps From: chopps@ro-chp.UUCP (Chris Hopps) Newsgroups: comp.sys.amiga.programmer Subject: Re: free() in SAS C Message-ID: Date: 4 May 91 18:35:03 GMT References: <1991May02.143148.22732@edb.tih.no> Organization: CHS Lines: 32 In article <1991May02.143148.22732@edb.tih.no> karlm@epsilon.tih.no (Karl Martin Lund) writes: > >I've had some problems while using the free() function in SAS C version 5.10. >It doesn't seem to free the memory to the system before the program exits. >It does, however, free the memory in a way such that the same program can use >it again when malloc is called. Has anybody any ideas of whats's the problem, >or is it made that way to minimize problems with memory fragmetation? yes. the free function releases memory into a pool for re-use, for compatibility with some unix systems it doesn't return it to the system until exit. >I am doing a lot of big, temporary memory allocations which I want to free to >the system after use. Does anyone know a way to do this in a ANSI compatible >way? By ANSI def. you can only (m|c|re)alloc 64k blocks and less. RTFM :^) SAS/C Volume 2, Page L19-22. >Thanks for any help! __ > / / >KMLUND __ / / > \ \/ / > \/_/ictory Chris... -- ------------------------ The Royal Oak Chophouse Chris Hopps Royal Oak, Michigan ....umich!wsu-cs!ro-chp!chopps cs.wayne.edu!ro-chp!chopps