Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!agate!shelby!neon!kaufman From: kaufman@Neon.Stanford.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: More Mac Wierdness (Memory Mangler) Message-ID: <1990Oct30.053914.1226@Neon.Stanford.EDU> Date: 30 Oct 90 05:39:14 GMT References: <1990Oct25.025224.23414@cpsc.ucalgary.ca> <1990Oct26.095921.24118@cs.umu.se> <1990Oct30.052411.21527@agate.berkeley.edu> Organization: Computer Science Department, Stanford University Lines: 22 In article <1990Oct30.052411.21527@agate.berkeley.edu> lippin@math.berkeley.edu writes: -Second, many system data structures can be in an inconsistent state at -interrupt time. For example, anything that's stored in a handle could -be caught in motion as memory is being shuffled. -Third, some toolbox routines (notably anything that draws) use global -variables in a non-reentrant manner. So you can't call those, for -fear that the main process is in the middle of a call. -The last two problems run deeper than the memory manager. In fact, I -suspect that some of the routines on the "may move or purge memory" -list in IM don't actually shuffle memory, but instead have these other -problems at interrupt time. Right on. I know of at least one VBL task that has tried to to a HeapSpace check while the memory manager was moving things about. (This was a Screen Dimmer program. I am starting to believe that there are way too many VBL and interrupt tasks that don't understand why one should stay away from the memory manager when they are run). Marc Kaufman (kaufman@Neon.stanford.edu)