Jeff,

>I guess a shared library can't be more than 32k, so that's one limitation.
>I'm curious, though, if anyone has experienced (or knows offhand) the
>maximum # of functions a shared lib can have.
>
>Another limitation I can think of would be the size of your dispatch table.
>Surely there's a finite size, and I suspect this might be the limiting
>factor?

You've got 11 bits for the routine selector number (high five bits of the trap word 
must be 10101, or 0xA800), so that means 2048 possible values. Each entry in the 
dispatch table is two bytes, so you'd chew up 4096 bytes for that, which means you 
could have a shared library with 2048 routines, each roughly 14 bytes long.

Note that you could create a 64K shared library if you put the dispatch table in the 
middle, since the word offsets in the dispatch table are treated as signed values, 
thus you've got a range of +/- 32K.

Of course the idea of having 2000+ routines in a shared library is pretty silly to 
start with...

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200 (direct) +1 408-261-7550 (main)


Reply via email to