This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with large arrays



On Jul 6, 2005, at 11:38 PM, 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 are just overflowing the stack. Either use the heap or a global/static
variable.


-- Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]