Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!cmcl2!nrl-cmf!ames!lll-tis!lll-winken!uunet!steinmetz!ge-dab!peora!rtmvax!scot
From: scot@rtmvax.UUCP (Scot Harris )
Newsgroups: comp.sys.amiga.tech
Subject: Manx problem with large arrays
Keywords: Manx C array help
Message-ID: <1795@rtmvax.UUCP>
Date: 10 Jul 88 23:56:21 GMT
Organization: Robert Talley (PRIVATE), Orlando, FL
Lines: 63


I was unable to help a friend on the local network with the following 
problem.  I only have the Lattice 4.0 compiler and was able to do
what the manx compiler apprently can not.  

Anyway I thought some of the Manx experts on this net might have run
across this or have some ideas that we have not tried.  Please email
your responses to me at:

  --------_----------------------------------------------------------         
    ///  /_\         	Scot L. Harris          !hoptoad!peora!rtmvax!scot 
  \XX/  /   \ M I G A   	    		    or rtmvax!amigash!scot
[of course I GNUUUCP from my AMIGA, doesn't everyone?] {thanks Mr. Loftus}

Following is the message that I was requested to pass on.  If you have any
ideas for solving this problem please email me.  Thanks.
------------------------------------------------------------------------

Aztec C68K Compiler      Version 3.6a

Amiga A500 + stock Commodore internal 512K expansion memory
  + Micron 2 Meg expansion Ram in SubSystem 500

KickStart = 33.180 Boot with SYS1 disk from Aztec C68 developers compiler.

Chip memory available at program startup equal to 436 K with Fast memory
equal to 2491 K..


THE PROBLEM:

Guru visitations when I attempt to set up and use large arrays. Use of the
+D option when compiling does not help.  Here is my sample code to
illustrate the problem:


/*  try.c  */

main() { static char Map [100000L]; long int i;

for (i=0; i<100000L; i++)
  Map [i] = 'c';

puts ("We Did It"); }

The following compiler, assembler, and linker commands are used:

cd df1:code     /* SYS1: in df0:   try.c in df1:code */

cc -A +D try.c as -D try ln try.o -lc

I have also compiled using +C, +F, +L options , and also without any
options just for good measure.  The assembler has also been used without
options.

All other applications work fine on my system.  The above code runs fine
under 64K and the small data model.  What's the problem?

--------------------------------------------------------------------------
-- 
  --------_----------------------------------------------------------         
    ///  /_\         	Scot L. Harris          !hoptoad!peora!rtmvax!scot 
  \XX/  /   \ M I G A   	    		    or rtmvax!amigash!scot
[of course I GNUUUCP from my AMIGA, doesn't everyone?] {thanks Mr. Loftus}