🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.oop.macapp3
1 messages
1 total messages Started by Lockwood, Mike Tue, 26 Jan 1993 17:10
Re3: Segment woes
#358
Author: Lockwood, Mike
Date: Tue, 26 Jan 1993 17:10
27 lines
1878 bytes
Hi Nick,
 
Under model near, all routines that are referenced from other segments must be
within the first 32K.  However, the segment itself can be bigger, as long as
all routines past 32K are only referenced from that segment.  If I remember
correctly, the %_MethTables segment has all entry points for polymorphic
methods at the beginning of the segment, followed by the actual method
dispatching function.  After that, I think there are various data structures
that control how each method is dispatched.  These data structures are only
referenced by the method dispatching function on the %_Methtables segment.
Given that, it seems perfectly reasonable that your %_Methtables segment would
be bigger than 32K.  If it actually was a problem, you wouldn't be able to link
your program.
 
By the way, the reason I suspected the %_Methtables segment in the original
message was because the ".READFROM" symbol sounds like a symbol for the method
dispatching entrypoint for TObject::ReadFrom().  The actual implementation of
the method would look like "TOBJECT_READFROM".  Since you can't resegment the
%_Methtables segment, you have no choice but to go Model Far if it goes too big
(unless you want to cut down on polymorphism in your application :-).
 
However, as Fred pointed out, better segmentation should allow you to avoid
Model Far in most cases.
 
Mike Lockwood
MPW Linker Trivia Buff
 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads