Path: utzoo!mnetor!uunet!husc6!endor!stew From: stew@endor.harvard.edu (Stew Rubenstein) Newsgroups: comp.sys.mac Subject: Re: Calling MoreMasters Message-ID: <3511@husc6.harvard.edu> Date: 10 Dec 87 02:55:54 GMT References: <1987Dec7.094745.599@mntgfx.mentor.com> Sender: news@husc6.harvard.edu Reply-To: stew@endor.UUCP (Stew Rubenstein) Organization: Aiken Computation Lab Harvard, Cambridge, MA Lines: 23 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? You gotta figure out how many handles your application is likely to need. My stuff has a varying requirement depending on how big the documents that the user works with. What I do is call it once for every 64K of memory allocated to the application heap. If the user resizes my app so that s/he can handle bigger documents, I therefore allocate more handles. The other way is simple trial and error - run your app for a while and then look at the heap with TMON or Macsbug or whatever. See how many master pointer blocks (0x100 byte nonrel blocks near the bottom of the heap) there are in your heap. Call MoreMasters that many (minus one) times in your startup code. Stew Rubenstein Cambridge Scientific Computing, Inc. UUCPnet: seismo!harvard!rubenstein CompuServe: 76525,421 Internet: rubenstein@harvard.harvard.edu MCIMail: CSC