Path: utzoo!mnetor!uunet!husc6!think!ames!ucbcad!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac Subject: Re: Calling MoreMasters Message-ID: <3561@hoptoad.uucp> Date: 9 Dec 87 08:44:40 GMT References: <1987Dec7.094745.599@mntgfx.mentor.com> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Sun Microsystems, TOPS Division, Berkeley Lines: 25 Keywords: memory masters handles In article <1987Dec7.094745.599@mntgfx.mentor.com> tomc@mntgfx.mentor.com (Tom Carstensen) writes: >What is a good guideline as to how many times you should >call MoreMasters? I've seen some programs call it >about 10 times, others 7 - is there better documentation >on the ROM call then that of Inside Mac? See Mac Technical Note #53, the penultimate paragraph. (Remember, you really can't do serious Mac programming without the tech notes.) Briefly, remove all your calls to MoreMasters, then bang the heck out of your program, doing just about everything as much as it can be done. Then use MacsBug or TMON to view the heap and count blocks of size $108, as well as $10c and $110. These are the master pointer blocks. Call MoreMasters that many times plus 20% at the start of your program. My favorite part of this tech note is the ultimate paragraph. "This is a simple strategy for handling MoreMasters. The prgram ResEdit uses a far more sophisticated approach, allocating master pointer blocks dynamically. That technique will be the subject of a future Technical Note." Tech Note #53 is from my birthday (Oct 28) in 1985; no such tech note has appeared yet, more than two years later. Perhaps in time for the first 68,000,000-based Mac.... -- Tim Maroney, {ihnp4,sun,well,ptsfa,lll-crg}!hoptoad!tim (uucp) hoptoad!tim@lll-crg (arpa)