Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!Apple.COM!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: Is multifinder or finder running?? Message-ID: <6280@internal.Apple.COM> Date: 20 Jan 90 01:33:58 GMT Sender: usenet@Apple.COM Organization: Objects-R-Us, Apple Computer, Inc. Lines: 52 References:<6075@internal.Apple.COM> <1990Jan13.041909.10943@waikato.ac.nz> In article <1990Jan13.041909.10943@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro) writes: > My guess is, the answer to both these questions is "no". So if you > find that OSDispatch is present, then MultiFinder is present. QED. What if a future system always implements the temporary memory calls? This happened before with WaitNextEvent. The only case where it makes sense to ask whether MultiFinder is running is if you want to display a window that says "MultiFinder is running." That's really the only case where the question make sense. If you want to know whether the system heap can expand, whether the Launch trap will return, or whether the Finder is running, those are independent questions. > This business of fixed-size application heaps can be greatly annoying True. > a little more work. *And* it requires you to know whether MultiFinder > is actually running. It requires that you know whether the System Heap can expand. > The solution? Under MF, allocate your large or > varying-sized objects in the system heap. Under MultiFinder, the system > heap will expand as necessary to accommodate the demands that everybody > puts on it, provided there's room for it to do so. I can think of a couple of problems with this. One is that the System Heap is generally very fragmented. There are INITs, and other system objects there that are locked down. Second is that giving the application its own heap makes it easier for the system to clean up. If an application does crash or doesn't free everything, the heap is blown away and the memory is reclaimed anyway. If you put everything in the System Heap, then garbage may be left behind (as you mentioned). It also seems dangerous to start mixing application objects and system objects in the same heap, where is bug in the application could trash a system heap block and bring down the whole system. Also, this would be a bad architecture if we wanted to some day support protected application heaps. Larry Rosenstein, Apple Computer, Inc. Object Specialist Internet: lsr@Apple.com UUCP: {nsc, sun}!apple!lsr AppleLink: Rosenstein1