P
pereges
I've to store an array of structures:
typedef struct
{
double origin[3];
double e_field_at_origin_real, e_field_at_origin_imag;
double direction[3];
double pathlength;
int depth;
}ray;
A single instance occupies 80 bytes of memory on my machine. I need
to store an array of more than 1,000,000 structures. My program is
failing if the array size exceeds 400,000 because I other big data
structures to store as well. Do you think it will be a better idea to
store the list on a file and use the file as an array ?
typedef struct
{
double origin[3];
double e_field_at_origin_real, e_field_at_origin_imag;
double direction[3];
double pathlength;
int depth;
}ray;
A single instance occupies 80 bytes of memory on my machine. I need
to store an array of more than 1,000,000 structures. My program is
failing if the array size exceeds 400,000 because I other big data
structures to store as well. Do you think it will be a better idea to
store the list on a file and use the file as an array ?