Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!bloom-picayune.mit.edu!news From: scs@adam.mit.edu (Steve Summit) Newsgroups: comp.lang.c Subject: Re: how does free() know how much to free? Message-ID: <1991Feb26.045059.6546@athena.mit.edu> Date: 26 Feb 91 04:50:59 GMT References: <1991Feb26.024207.26167@wpi.WPI.EDU> Sender: news@athena.mit.edu (News system) Reply-To: scs@adam.mit.edu Organization: Thermal Technologies, Inc. Lines: 23 In article <1991Feb26.024207.26167@wpi.WPI.EDU> fenn@wpi.WPI.EDU (Brian Fennell) writes: >how does free know how much to free? *Four!* Our four weapons are... Ahem. YA FAQ list teaser: 55. How does free() know how many bytes to free? A: The malloc/free package remembers the size of each block it allocates and returns, so it is not necessary to remind it of the size when freeing. Security on adam is not tight; clearly some underground hacker's organization, for inscrutable purposes of its own, has broken in and stolen a copy of next month's greatly-expanded FAQ list, and is now trickling out its new questions, from random accounts around the country, just to torment me... Steve Summit scs@adam.mit.edu Maybe I should just post the darn thing a week early...