Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: Memory allocation/deallocation for tree? Any good way? Message-ID: <20872:Jan1017:54:3891@kramden.acf.nyu.edu> Date: 10 Jan 91 17:54:38 GMT References: <1991Jan7.034619.4449@portia.Stanford.EDU> <14805@smoke.brl.mil> Organization: IR Lines: 14 In article <14805@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes: > In article mcdaniel@adi.com (Tim McDaniel) writes: > >A free() that did nothing would satisfy ANSI C, ... > Not strictly true, as the standard specifies that the storage is made > available for subsequent allocation. However, there is no strictly > conforming way to test for this behavior. Doesn't as-if kick in here? A conforming program cannot figure out that a no-op is different from the definition of free(); therefore the no-op works as if it were a free() satisfying the literal definition; therefore the no-op is a valid implementation of free(). Where's the mistake? ---Dan