Hi, using this basic setup:
struct frame
{
int frameNmbr[153];
string phone[153];
int state[153];
float logP[153
};
infile3.open("output.txt");
i=j=0;
frame newestFrame;
for(i=0; i < 558; i++)
{
for(j=0; j < 153; j++)
{
infile3>>newestFrame.frameNmbr[j];
infile3>>newestFrame.phone[j];
infile3>>newestFrame.state[j];
infile3>>newestFrame.logP[j];
arrOut.push_back(newestFrame);
}
}
infile3.close();
Running just that, the memory usage balloons to nearly 500 MB Ram and still hangs for a minute or two every 100 iterations of i. Why is this?
Thanks,
James
struct frame
{
int frameNmbr[153];
string phone[153];
int state[153];
float logP[153
};
infile3.open("output.txt");
i=j=0;
frame newestFrame;
for(i=0; i < 558; i++)
{
for(j=0; j < 153; j++)
{
infile3>>newestFrame.frameNmbr[j];
infile3>>newestFrame.phone[j];
infile3>>newestFrame.state[j];
infile3>>newestFrame.logP[j];
arrOut.push_back(newestFrame);
}
}
infile3.close();
Running just that, the memory usage balloons to nearly 500 MB Ram and still hangs for a minute or two every 100 iterations of i. Why is this?
Thanks,
James