Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Max. no. of code segments Message-ID: <28903@ucbvax.BERKELEY.EDU> Date: 26 Apr 89 03:48:31 GMT References: <53100005@uxh.cso.uiuc.edu> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 18 In article <53100005@uxh.cso.uiuc.edu> thinfilm@uxh.cso.uiuc.edu writes: > What is the largest number of segments allowed in an application on the >mac and what rules should one work by for this. Since a resource map can only have about 2000 entries, you can only have 2000 code segements in one file. The global segment jump table is 32k bytes long, so you can only have roughly 4k jump insturctions in it: that is, you can only have 4k globally visible procedures. Both C (the "static" keyword) and pascal (nested procedures) let you define procedures that won't appear in the global segment tables. Note: the reosource manager uses linear search, so if you have 2k code segments, any procedure cal that causes a LoadSegement() will likely be slow. --- David Phillip Oster --"When we replace the mouse with a pen, Arpa: oster@dewey.soe.berkeley.edu --3 button mouse fans will need saxophone Uucp: {uwvax,decvax}!ucbvax!oster%dewey.soe.berkeley.edu --lessons." - Gasee