Getting core.exception.OutOfMemoryError error on allocating large arrays

Sparsh Mittal sparsh0mittal at gmail.com
Sun Mar 3 08:02:30 PST 2013


> Assuming double.sizeof==8 on your machine, You're requesting 
> 1024*1024*1024*8*8 bytes = 68GB, do you have that much RAM 
> available?
You are completely correct, however in C, one could do:

const long DIM = 1024L * 1024L * 1024L* 8L ;
int  main() {
    double signal[DIM];
  }

which runs fine. So, I was sort of looking for some solution like 
this.



More information about the Digitalmars-d-learn mailing list