Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!elroy!cit-vax!tybalt.caltech.edu!wetter From: wetter@tybalt.caltech.edu (Pierce T. Wetter) Newsgroups: comp.sys.mac.programmer Subject: Re: Flex fast lexical analyzer for MPW announcement. Keywords: %Globaldata Sucks Wind. Message-ID: <6645@cit-vax.Caltech.Edu> Date: 23 May 88 09:53:37 GMT References: <8534@dartvax.Dartmouth.EDU> <10896@apple.Apple.Com> Sender: news@cit-vax.Caltech.Edu Reply-To: wetter@tybalt.caltech.edu.UUCP (Pierce T. Wetter) Organization: California Institute of Technology Lines: 29 In article <10896@apple.Apple.Com> dan@apple.UUCP (Dan Allen) writes: >I agree that a 32K global data limit is stupid. But the workaround in >most cases is so trivial (especially in C) that why waste time worrying >about it? USE THE HEAP! If a program needs big buffers or big arrays, 32K = 3,276.8 Real numbers. I have seen programs which have arrays with more then this many data points in the code. (State tables for the solar system). These are static constants which count as global data. Granted this could be put in a data file, but when you're the one given the task of porting this code over, its not a fun job editing a hugh file of numbers into some format from a mess of DATA statements. Additionally many programs such as lex, gnuchess, yacc, bison etc. were originally written assuming there was infinite memory. When you don't really understand what the code does (which I didn't with bison, I just replaced array declartions with malloc) its a pain to go back and find ALL large array references and fix them. ABOVE ALL, 32K IS HALF AS MUCH AS THE LIMIT SHOULD BE. Whoever is in charge of writing linkers for Mac compilers could instantly double the amount of global data simply by pointing A5 at the MIDDLE of the global data rather then the top. After all its a SIGNED offset, so that means there's 32K each direction. Are you listening Apple, Think? Pierce Wetter ---------------------------------------------------------------- wetter@tybalt.caltech.edu Race For Space Grand Prize Winner. ----------------------------------------------------------------- Useless Advice #986: Never sit on a Tack.