rokicki@polya.Stanford.EDU (Tomas G. Rokicki) (07/12/88)
Actually, this is more a known limitation than anything; the bug
is that the compiler (and linker don't complain. You see, the
compiler, at least under small data, assumes that it can reach
everything with a 16-bit offset from an address register.
Obviously if you declare such large arrays, it cannot. It could
just look at the size of the array and say `that's too big',
unless you are using the array (and compiling code) in a file
where the array is declared external. It's real easy to get
around, with a malloc, and probably helps your program run on a
fragmented system, but I hope Jim gets around to flagging that
as an error real soon. I've seen too much code that assumes a
virtual memory environment and simply
int foo[100000], bar[100000], baz[100000] ;
-tom
--
/-- Tomas Rokicki /// Box 2081 Stanford, CA 94309
/ o Radical Eye Software /// (TAMU EE '85) (415) 326-5312
\ / | . . . or I \\\///Join CCFFAALW---Concerned Citzens
V | won't get dressed \XX/Fighting For An Acronym-Less World