🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.oop.macapp3
Article #358

Re3: Segment woes

#358
From: 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
 
Technical Details
Message-ID: <728068622.2703626@AppleLink.Apple.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!emory!gatech!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!agate!stanford.edu!apple!applelink.apple.com

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!emory!gatech!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!agate!stanford.edu!apple!applelink.apple.com
From: ASTRO.SPUD@AppleLink.Apple.COM (Lockwood, Mike)
Newsgroups: comp.sys.mac.oop.macapp3
Subject: Re3: Segment woes
Message-ID: <728068622.2703626@AppleLink.Apple.COM>
Date: 26 Jan 93 17:10:00 GMT
Sender: usenet@Apple.COM
Organization: AppleLink Gateway
Lines: 27