Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven.umd.edu!ncifcrf!lhc!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: Return segment to OS Message-ID: <15951@smoke.brl.mil> Date: 23 Apr 91 20:05:31 GMT References: <1991Apr22.100300.1367@mdcbbs.com> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 10 In article <1991Apr22.100300.1367@mdcbbs.com> gd010gd02@mdcbbs.com writes: - It appears that the memory requested from the operating - system by malloc() is never released even after all the - entries in the allocated segment have been free()'ed - Does anyone know of a "safe" way of returning a segment - to the operating system? You didn't say WHICH operating system, but the generic answer is: "No, if the malloc/free implementation doesn't take care of this it would be folly for your application program to try to."