[comp.sys.amiga.programmer] Aztec C Compiler Woes

c315-25@cs.UAlberta.CA (Huisman Kenneth M) (04/20/91)

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