Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!alberta!c315-25 From: c315-25@cs.UAlberta.CA (Huisman Kenneth M) Newsgroups: comp.sys.amiga.programmer Subject: Aztec C Compiler Woes Keywords: C, Problems, Bug (?), Aztec Message-ID: <1991Apr19.195257.280@cs.UAlberta.CA> Date: 19 Apr 91 19:52:57 GMT Sender: news@cs.UAlberta.CA (News Administrator) Organization: University of Alberta, Edmonton, Canada Lines: 37 I have the latest version of Aztec C (5.0e). I have been working on a little program for a while, and have it completely debugged (as far as I know). Right now the program doesn't do much except open and read from a file. Sounds simple enough, right? My problem is, when I added a really big array declaration: struct whatever var[84][84]; the program would guru at runtime (note: this is >300kb of data) I got three different guru numbers, all trap codes (line f, unaligned address, and illegal instruction). I _never_ use the above array in the program, and if I comment it out, it works fine. Also, I have found that if I lower the size of the array in the declaration to [82][82], the program works fine. It just seems to stop working when I hit some threshold size (numbers >84 also cause problems). Is this a bug in the compiler? I have 3 MB of ram and memory shouldn't be a problem. I don't understand why it should suddenly stop working when my data gets that big. I am using the large code/data model, and I don't get any warnings or anything from the compiler. If anyone has any suggestions on how I should deal with this, please let me know. I was thinking of just making it a pointer and mallocing the space for the structure at runtime, but I would still like to know why it is having problems with this large amount of data. E-mail responses would be preferred. Thanks. Ken Huisman c315-25@cs.ualberta.ca