Re: maximum number of variables?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I am presently running a huge code following the hydrodynamical evolution of a system (in 2 dimentions). I store the quantities evolving (density, velocity, pressure) into large 2-D arrays. Recently, I tried to make my 2-D arrays bigger (to study a bigger system) and eventually, I reached a certain point where I was getting a "segmentation error". The only thing I changed was the size of my arrays.

I deleted a few arrays that were redundant (making my code less user friendly), and I found that I could slightly increase the size of my arrays until I reached the "segmentation error".

Here are my questions: 1) Is there a maximum number of variables allowed when using gcc? (from my experience I am guessing yes) 2) Is there a way to increase the number of variables allowed when using gcc?

It sounds like you may have overflowed the stack. Could you try
increasing the stack size? I don't know how to do that though with gcc.

I had to check on the web real to see what you meant. I am a physicist trying to program, and not a programmer trying to do physics :)

According to a web site, the default stack size on OS X is 8 MB. it is possible that I have exceeded that. I am looking into ways of trying to increase this.

Nicolas Ouellette



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux