Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!news.funet.fi!funic!santra!hila.hut.fi!jmunkki From: jmunkki@hila.hut.fi (Juri Munkki) Newsgroups: comp.sys.mac.programmer Subject: Re: Another THINK Pascal gotcha - "With" instance vars Message-ID: <1991Jan25.234200.7536@santra.uucp> Date: 25 Jan 91 23:42:00 GMT References: <1991Jan25.233122.2825@fennel.cc.uwa.oz.au> Sender: news@santra.uucp (Cnews - USENET news system) Reply-To: jmunkki@hila.hut.fi (Juri Munkki) Organization: Helsinki University of Technology, FINLAND Lines: 21 In article <1991Jan25.233122.2825@fennel.cc.uwa.oz.au> a_dent@fennel.cc.uwa.oz.au writes: >"with" and may be quite small (depending on what you call). However, even >if you don't call things that move memory, the presence of networking drivers >such as Tops can cause memory moves inside ANY sequence of code. Most of us know that this is not true. It might be true of TOPS (I never liked that product, so it's easy to convince me that it has bugs in it), but in general drivers and other interrupt level routines do not move memory manager blocks. You have to call a toolbox routine (and not just any routine, although nowadays it's considered bad style to assume that some routines do not move memory) to cause a change in memory manager structures. Even Inside Macintosh warns Pascal programmers about "with", so it really shouldn't be a gotcha. It's just a common bug. Use a heap scrambler along with discipline to find the bugs. ____________________________________________________________________________ / Juri Munkki / Helsinki University of Technology / Wind / Project / / jmunkki@hut.fi / Computing Center Macintosh Support / Surf / STORM / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~