Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ncar!news.miami.edu!umiami!ian From: ian@umiami.ir.miami.edu Newsgroups: comp.sys.mac.programmer Subject: Question About NewPtr... Message-ID: <1991Jan25.002913.7668@umiami.ir.miami.edu> Date: 25 Jan 91 05:29:13 GMT Organization: Univ of Miami IR Lines: 24 This is in regard to the question posted recently about HEAP compaction and lost pointers....I writing a program in C (Think C) for the Mac and up till now I was using malloc for dynamic allocation when I saw the posting (and spoke with Jason) I checked Inside Mac volume I the info about the memory manager was interesting all that about relocatable blocks and whatnot...but the information about NewPtr wasn't very specific...it says that NewPtr returns a Ptr....I tried replacing all of my mallocs with NewPtr but now I get a compile error saying that the varible and the Ptr returned by NewPtr aren't the same...I'm not sure what I'm doing wrong...the varible I'm trying to set is of type SomeRecord *gAPointer; could anyone help me out....Thanx -- Scruffy Ian Sullivan ******************************************************************************* ** % "Would that love were such a thing ** **ian@umiami.ir.miami.edu % that one could hold, see, or touch ** ** % and perhaps squash the life out of" ** **UUU UMUMMM MMMMMM % -Anonymous ** **UUU UMU MMM MMM MMM % ** **uUU UMU MMM MMM MMM % "Life's been good to me so far..." -J.W. ** **UUUUUUUUMUof MMMMM MMM % "Give it a while." -Me. ** *******************************************************************************