Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!fwi.uva.nl!freek From: freek@fwi.uva.nl (Freek Wiedijk) Newsgroups: comp.sys.mac.programmer Subject: NewPtr(MaxMem) { Why? } Message-ID: <299@fwi.uva.nl> Date: 20 Dec 89 16:56:15 GMT Sender: news@fwi.uva.nl Reply-To: freek@fwi.uva.nl (Freek Wiedijk) Organization: Faculteit Wiskunde & Informatica, Universiteit van Amsterdam Lines: 23 X-Dragon: Orm Embar Why is the following (Turbo) Pascal program so slow? program Slow; {$R-}{$I-}{$U-} uses Memtypes,QuickDraw,OSIntf; var s,g: Size; p: Ptr; begin MaxApplZone; s:=CompactMem(MaxMem(g)); p:=NewPtr(s); if MemError=memFullErr then SysBeep(2) end {Slow}. Why does APDA Smalltalk start so slowly? Why does the NewPtr sometimes fail (i.e. the program beeps)? Why doesn't MaxMem compact the heap (in contradiction with IM-II-38)? Why is a Mac better than a PC and a NeXT? :-) -- Freek "the Pistol Major" Wiedijk Path: uunet!fwi.uva.nl!freek #P:+/ = #+/P?*+/ = i<<*+/P?*+/ = +/i<<**P?*+/ = +/(i<<*P?)*+/ = +/+/(i<<*P?)**