Re: cc1plus: out of memory allocating 33554432 bytes after a total of 38465536 bytes

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

 



Hi Pavel,

My recommendation:

Wrap your array in a class.

Allocate your array as:
myArray = new REAL[7 * 7 * 7 * 7 * 7 * 7 * 7];

Use an accessor:
REAL Get(int i, int j, int kk, int l, int mm, int ss, int kf) const;

Use a mutator:
void Set(REAL value, int i, int j, int kk, int l, int mm, int ss, int kf);

Initialize your array by loading your data from a file, not by hard coding
the values in the source code.
void Load(std::string& filename);

Then you should not run into the compiler problems you are experiencing by
compiling source code too big for GCC to process.

HTH,
--Eljay


[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