memory usage of code compiled with gcc 3.2
Andrea 'Fyre Wyzard' Bocci
fwyzard@inwind.it
Fri Dec 27 20:07:00 GMT 2002
At 10.54 27/12/2002 -0300, hektor monteiro x285 wrote:
>Hi everyone! I am working with an astrophysical code that uses a lot of
>memory (RAM). Basically because of a 3D matrix that I have to define. I
>was working with 1G of RAM before and could run the code with a cube of
>70^3 cells. Recently I bought a new super machine with 4g of RAM and I am
>using the gcc 3.2 compiler on linux redhat 7.3. But I am not able to run
>more than 70^3 cells on this. Can anyone give me some clue?? I would think
>I should be able to do better no? Is this a linux kernel limitation or gcc
>or something else??
>
>cheers,
>
>Hektor
Hi Hector.
Actually, there are limitations on the size arrays con have with GCC, but I
don't think you've stumbled in that. A 70*70*70 array is 343000 cells;
using doubles, that'd amount to little over 2.6 MB. I think up to arrays of
500*500*500 doubles you should have no problem (apart from exausting RAM,
that is :-).
So, could you be a little more specific on what "I am not able to run more
than 70^3 cells" means ? Do you get errors at compile time, or run time ?
And, especially at runtimewhat kind of errors ?
fwyzard
More information about the Gcc-help
mailing list