Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!uakari.primate.wisc.edu!xanth!mcnc!ncsuvx!ecemwl!jnh From: jnh@ecemwl.ncsu.edu (Joseph N. Hall) Newsgroups: comp.sys.mac.programmer Subject: MPW C 3.0 memory allocator broken ... Message-ID: <4193@ncsuvx.ncsu.edu> Date: 15 Oct 89 23:41:48 GMT Sender: news@ncsuvx.ncsu.edu Reply-To: jnh@ecemwl.UUCP (Joseph N. Hall) Organization: North Carolina State University Lines: 15 I was porting a UNIX application that makes heavy use of calloc() and free() the other day, and watched it die repeatedly with the DebugStr "attempt to free". After I replaced calloc() with NewPtrClear() and free with DisposPtr() everything worked great ... is this a known bug? The application made use of a lot of small, differently-sized blocks; i.e., short strings. If the "improved" allocator in the MPW C libraries maintains free lists of small blocks, maybe it's breaking under the strain of too many different sizes ... ? It irritates me that the library source isn't supplied with MPW; it sure would have made debugging a hell of a lot simpler. v v sssss|| joseph hall || 4116 Brewster Drive v v s s || jnh@ecemwl.ncsu.edu (Internet) || Raleigh, NC 27606 v sss || SP Software/CAD Tool Developer, Mac Hacker and Keyboardist -----------|| Disclaimer: NCSU may not share my views, but is welcome to.