Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!sdd.hp.com!spool2.mu.edu!uunet!mcsun!hp4nl!star.cs.vu.nl!tamboer From: tamboer@cs.vu.nl (Tamboer Erik) Newsgroups: comp.os.msdos.programmer Subject: Re: free() question Message-ID: <8828@star.cs.vu.nl> Date: 23 Jan 91 13:49:38 GMT References: <8822@star.cs.vu.nl> Sender: news@cs.vu.nl Lines: 18 Well, it seems it is not safe to free() already freed memory. I thought maybe the system would keep track of its malloc()ed space and would know if the block one tries to free() is already free. Wishful thinking. Well, I came up with a routine that did in fact crash my system when trying to free already freed memory (recursively!) so I'm convinced. I have found a satisfactory solution for my particular problem, so I'll live. Thanks to Raymond Chen and Jamshid Afshar (my docs really say nothing about freeing memory twice!) and to Steve Resnick, who pointed out that I should have posted my question to comp.lang.c. Sorry, I didn't even know that group exists! Erik -- ____________________ ________________________________________ / Erik Tamboer /\__ / I would have included a really funny /\__ / tamboer@cs.vu.nl /__\/ / joke here, but I already logged out. /__\/ /___________________/ /_______________________________________/