home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / oop / macapp3 / 622 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  1.8 KB

  1. Path: 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
  2. From: ASTRO.SPUD@AppleLink.Apple.COM (Lockwood, Mike)
  3. Newsgroups: comp.sys.mac.oop.macapp3
  4. Subject: Re3: Segment woes
  5. Message-ID: <728068622.2703626@AppleLink.Apple.COM>
  6. Date: 26 Jan 93 17:10:00 GMT
  7. Sender: usenet@Apple.COM
  8. Organization: AppleLink Gateway
  9. Lines: 27
  10.  
  11. Hi Nick,
  12.  
  13. Under model near, all routines that are referenced from other segments must be
  14. within the first 32K.  However, the segment itself can be bigger, as long as
  15. all routines past 32K are only referenced from that segment.  If I remember
  16. correctly, the %_MethTables segment has all entry points for polymorphic
  17. methods at the beginning of the segment, followed by the actual method
  18. dispatching function.  After that, I think there are various data structures
  19. that control how each method is dispatched.  These data structures are only
  20. referenced by the method dispatching function on the %_Methtables segment.
  21. Given that, it seems perfectly reasonable that your %_Methtables segment would
  22. be bigger than 32K.  If it actually was a problem, you wouldn't be able to link
  23. your program.
  24.  
  25. By the way, the reason I suspected the %_Methtables segment in the original
  26. message was because the ".READFROM" symbol sounds like a symbol for the method
  27. dispatching entrypoint for TObject::ReadFrom().  The actual implementation of
  28. the method would look like "TOBJECT_READFROM".  Since you can't resegment the
  29. %_Methtables segment, you have no choice but to go Model Far if it goes too big
  30. (unless you want to cut down on polymorphism in your application :-).
  31.  
  32. However, as Fred pointed out, better segmentation should allow you to avoid
  33. Model Far in most cases.
  34.  
  35. Mike Lockwood
  36. MPW Linker Trivia Buff
  37.  
  38.