Xref: utzoo comp.sys.ibm.pc:9452 comp.lang.c:5524 Path: utzoo!dciem!nrcaer!cognos!brianc From: brianc@cognos.uucp (Brian Campbell) Newsgroups: comp.sys.ibm.pc,comp.lang.c Subject: Re: Releasing heap space - MSC 4.0 Message-ID: <1961@cognos.UUCP> Date: 10 Dec 87 18:44:02 GMT Article-I.D.: cognos.1961 Posted: Thu Dec 10 13:44:02 1987 References: <279@dsacg1.UUCP> Reply-To: brianc@cognos.UUCP (Brian Campbell) Organization: Cognos Incorporated, Ottawa, Canada Lines: 18 In article <279@dsacg1.UUCP> nts0699@dsacg1.UUCP (Gene McManus) writes: > Is there a way to release large blocks of malloc'd heap space back to the > system when it is freed and no longer needed? General-purpose heap clean-up > routine? I have an application that > exec's other stuff (system("...") call) and I'd like to make all the memory > available that I no longer need. Quote from Microsoft Customer Support Engineer when I asked the same question: The MSC 4.0 routine free(), used in conjunction with malloc() does not actually return the memory back to the operating system. However, if you use halloc() to allocate memory, then hfree() will actually release the memory to the operating system. -- Brian Campbell uucp: decvax!utzoo!dciem!nrcaer!cognos!brianc Cognos Incorporated mail: POB 9707, 3755 Riverside Drive, Ottawa, K1G 3Z4 (613) 738-1440 fido: (613) 731-2945 300/1200, sysop@1:163/8