From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,cea30133e185dc3 X-Google-Attributes: gid1014db,public X-Google-Thread: fee84,cea30133e185dc3 X-Google-Attributes: gidfee84,public From: "Gerald A. Feldman" <"gafNoSPAM"@mediaone.net (Remove NoSpam)> Subject: Re: How do you release memory back to the kernel in C Date: 1998/05/23 Message-ID: <6k72vp$a7f$1@ndnws01.ne.highway1.com>#1/1 X-Deja-AN: 355883998 Content-Transfer-Encoding: 7bit References: <35616C36.9167165F@citicorp.com> <35620a04.2342689789@207.126.101.81> <3563E139.E7536C13@citicorp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Boston Computer Solutions and Consulting Newsgroups: comp.unix.osf.osf1,comp.lang.c Asgar Ali wrote: > > Sorry, > > the triple free(ptr) did not work on this DEC system. It's not supposed to. According to the ANSI C standard (4.10.3.2), if the space has been deallocated by a call to free or realloc, the behavior is undefined. In Digital Unix, the allocator does return memory back to the system if it is able to. Most C allocators do not. -- Jerry Feldman Boston Computer Solutions and Consulting http://gaf.ne.mediaone.net/