Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!ig!agate!labrea!Portia!jessica.stanford.edu!rick From: rick@jessica.stanford.edu (Rick Wong) Newsgroups: comp.sys.mac.programmer Subject: 32K jump table limit Keywords: MacApp Message-ID: <3425@Portia.Stanford.EDU> Date: 24 Aug 88 18:47:38 GMT Sender: news@Portia.Stanford.EDU Reply-To: rick@jessica.stanford.edu (Rick Wong) Organization: Stanford University Lines: 29 Much has been written here about the Mac's 32K global DATA limit. I've got a nastier problem: the 32K JUMP TABLE limit is too small. On the Mac, code is divided into segments, to allow code to be swapped into memory as needed. Routines call routines in other segments indirectly, via the jump table. Also, Object Pascal uses the jump table for method dispatching. Since each entry in the jump table is 8 bytes, the maximum number of entries is about 4K (4091, accounting for extra fields before the jump table). At first, over 4000 procedures seems a huge number. It isn't. I am using MacApp, which is written in Object Pascal. Every method requires requires another jump table entry. The simplest MacApp application, which does "nothing," uses about 1100 entries with debugging, 600 without. The remaining entries don't seem so numer- ous in large MacApp applications. (By the way, the MPW 2.0.2 linker goes into an infinite loop when an application goes over this 4K limit.) Does anyone have any suggestions for dealing with this problem? (This looks like a job for Apple.) Rick Wong Courseware Authoring Tools Project, Stanford University rick@jessica.stanford.edu