Article View: comp.sys.mac
Article #16436Code Segments > 32K
From: rs4u+
Date: Fri, 29 May 1987 12:25
Date: Fri, 29 May 1987 12:25
41 lines
2125 bytes
2125 bytes
in <2068@emory.UUCP>, gatech!seismo!cmcl2!nyu-acf2.arpa!siritzky (Brian
Siritzky) writes:
". ... All of these C compilers
. will only allow you a 32K code segment - for the whole program. In our
. case this was way too little.
. I have since tried the MPW C. It is better than the others for my problems,
. although it still has the 32k limitation (I'm told that this is a problem
. with the Mac OS!).
"
This is partially true. You're allowed a maximum of 32K of executable
code per code segment, but that is *not* a 32K limit on total program size.
You can have as many segments as you needs, and every single
development system I've come across (TML Pascal, MPW, LSP, LSC) has
provision for you to create multiple segments. Usually, the linker will
tell you if a code segment is too big, and allow you to create
new ones (Lightspeed C and Lightspeed Pascal make it especially easy).
As far as this limitation being a "problem" with the Mac OS, I
doubt it. It *is* a limit, but the 32K segment limit assists in
using memory efficiently -- unused code can be dynamically unloaded and
reloaded, with very little programmer intervention. (You have to call
a routine to unload a segment, but loading is done automatically.)
If you really wanted to, you could write your own segment loaded, and
then have segments as big as you want.
--Rich
Richard M. Siegel
R-Squared Development Systems
134 Horseshoe Drive
Williamsburg, Virginia 23185
(804) 229-2152 [After 6pm eastern time only]
Arpanet: rs4u@andrew.cmu.edu
Uucp: {your fave gateway}!seismo!andrew.cmu.edu!rs4u
Disclaimer? I don't even KNOW 'er!
Technical Details
Message-ID:
<gUjLscy00UhTg480nL@andrew.cmu.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!ANDREW.CMU.EDU!rs4u+Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!ANDREW.CMU.EDU!rs4u+ From: rs4u+@ANDREW.CMU.EDU.UUCP Newsgroups: comp.sys.mac Subject: Code Segments > 32K Message-ID: <gUjLscy00UhTg480nL@andrew.cmu.edu> Date: Fri, 29-May-87 08:25:12 EDT Article-I.D.: andrew.gUjLscy00UhTg480nL Posted: Fri May 29 08:25:12 1987 Date-Received: Sat, 30-May-87 10:24:00 EDT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 41