This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: memory usage of code compiled with gcc 3.2
- From: Andrea 'Fyre Wyzard' Bocci <fwyzard at inwind dot it>
- To: hektor monteiro x285 <hmonteiro at ctio dot noao dot edu>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 28 Dec 2002 02:48:25 +0100
- Subject: Re: memory usage of code compiled with gcc 3.2
- References: <5.2.0.9.2.20021227170527.01a03208@popmail.libero.it>
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