This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: problem with large arrays
- From: Peter Teuben <teuben at astro dot umd dot edu>
- To: apaz at purdue dot edu
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 6 Jul 2005 23:44:04 -0400 (EDT)
- Subject: Re: problem with large arrays
- References: <1120707488.42cca3a074095@webmail.purdue.edu>
On Wed, 6 Jul 2005 apaz@purdue.edu wrote:
>
>
> Could you please tell me how can I work with large arrays in C/Objective-C. My
> compiler (gcc) can not handle, for example, the following array
> a[15][150][9][197], which is not too big. If I reduce the size to
> a[15][150][9][19], for example, it works ok. I had prepared a small example to
> show the problem and it's in the attachment. Finally, I have the problem with
> both Linux and cygwin.
you're probably declaring this array in the body of a function? You
could make it a static, or "promote" it a static in global namespace
of the file. Look at the command "size" on your executable.
- peter