[comp.sys.mac.programmer] Re^2: Think C 32K global data limit: workaround?

mark@intek01.UUCP (Mark McWiggins) (12/20/89)

ech@cbnewsk.ATT.COM (ned.horvath) writes:

>From article <257@intek01.UUCP>, by mark@intek01.UUCP (Mark McWiggins):
>> We're getting discouraged with the speed of MPW C (especially with C++)
>> and are interested in evaluating Think C as a target for C++ 2.0. 
>> But the 32K global data limit is a concern.  Has anyone come up with 
>> a satisfactory workaround?

>This is a classic red herring in Macintosh programming: you aren't limited
>to 32K of data space, just to 32K of named globals.  You can allocate any
>amount of memory up to available RAM (or user-specified RAM partition under
>Multifinder) by using NewPtr or, better, NewHandle ...

I know, but not *portably*.  We use third-party tools (Yacc, C-tree, etc.)
that consume varying amounts of (named) global data space themselves, and
it seems ridiculous to have to go rewriting working source to adapt to an
arbitrary limit.  To work around the 32K limit, I have extracted Yacc tables
from a working parser, put them in a disk file, and read them into an array 
in heap space.  It worked, but it's an awful pain.  When the 680x0 can address
16MB (on up), WHY limit it this way?


-- 
Mark McWiggins			Integration Technologies, Inc. (Intek)
+1 206 455 9935			DISCLAIMER:  I could be wrong ...
1400 112th Ave SE #202		Bellevue WA  98004
uunet!intek01!mark		Ask me about C++!