Getting core.exception.OutOfMemoryError error on allocating large arrays

Sparsh Mittal sparsh0mittal at gmail.com
Sun Mar 3 06:05:00 PST 2013


I am running


enum long DIM = 1024L * 1024L * 1024L* 8L ;
void main() {
   auto signal = new double[DIM];
}


and getting core.exception.OutOfMemoryError error.  One option is 
to use short/int, but I need to use double. Also, on using large 
arrays, computer becomes slow.

Is there no workaround at all, so that I can work on large 
arrays? Please let me know.


More information about the Digitalmars-d-learn mailing list