Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!rutgers!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: Think C 32K global data limit: workaround? Message-ID: <37420@apple.Apple.COM> Date: 20 Dec 89 03:26:23 GMT References: <5837@internal.Apple.COM> <1672@cbnewsk.ATT.COM> Organization: Apple Computer Inc, Cupertino, CA Lines: 55 In article <1672@cbnewsk.ATT.COM> ech@cbnewsk.ATT.COM (ned.horvath) writes: >In article <1664@cbnewsk.ATT.COM> I wrote: >> So far, the MPW linker won't give non-apps globals, hence no method >> dispatch tables. > >From article <5837@internal.Apple.COM>, by lsr@Apple.COM (Larry Rosenstein): >> See Tech Note #256. > >I've seen it. It's an excellent example of "tell me what you need, I'll >tell you how to live without it." The suggestion is incomplete -- e.g. >initialized data is not addressed -- and requires the connivance of the >underlying application. I don't have that connivance with, say, DAs. >Or other drivers. Or FKEYs. Or any other code resource intended to exist >independently of a PARTICULAR application. Or even with HyperCard -- the >example in the technote requires careful attention in the Hypercard script >to making sure the XCMD-with-persistent-data is properly set up and torn >down -- an error in that script hoses memory at random, a very user- >unfriendly XCMD to put in the hands of "the rest of us." Ned, One of us - either you or me - doesn't know what you're talking about. When you say that it doesn't address the issue of initialized data, what do you mean? After all, MakeA5World is supposed to do this for you. By "this", I mean that it creates space for your data, and initializes it all to zero, or with predefined values if you are using C or Assembly. As for DA's, you don't have to rely on any host application. You can just stick your A5 reference into dCtlStorgage. Same with other drivers. As for FKEYs, you can use a hack that I used originally, which was to link in a little assembly PROC that I jammed my A5 reference into. If you have other issues with the technote (like, for example, I forgot to suggest that one call InitGraf when setting up his/her A5 world), then please let me know. In particular, I'd like to hear your suggestions on getting rid of the global data without getting some sort of close message. And remember, you don't HAVE to use persistant global data. Nothing in the rules about that. I just mentioned it and showed how to do it in the (inevitable) case that someone asked. Finally, I'd like to hear where you read "and I'll tell you how to live without it." I tried to be accomodating. In cases where I said you couldn't do something, I also tried to explain why. If I failed in some places please let me know. All of this applies to EVERY TECHNOTE, and to EVERY READER of this network: if you have issues with out Technotes...then let us know! Don't go flaming on the nets. We're here. We listen. These technotes are for you, and we want them to be useful... -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions