On my system (Windows, 8 GB RAM 64-bit i7), Octave is having this problem handling medium sized arrays. I have task manager open, and the memory never going beyond 200 MB before the graphing section. It will often crash around 150 MB. The interesting thing is that if I put breakpoints into my code to find where the problem lies, the problem goes away, and I am actually able to get through everything, and move on to the graphing portion. It also crashes through that unless I add breakpoints every other graph.
With breakpoints, I am able to load it up to the full script load which should be around 1 GB. I'm not crazy right? This is supposed to be easy stuff that Matlab would breeze through in a second.
Below is a snippit of code that will crash unless I use breakpoints at every double new line.
n2040id = fopen(n_20to40ft_file);
n2040data = dlmread(n2040id,',', [8 1 70849 98]);
fclose(n2040id);
n20test = n2040data(3410:22066,:);
n30test = n2040data(26730:45748,:);
n40test = n2040data(49874:68706,:);
clear n2040data;
%% 20Ft Test Processing
n20spo2 = n20test(:,88);
n20spo2(n20spo2 == 0) = [];
n20co = n20test(:,89);
n20co(n20co == 0) = [];
clear n20test;
%% 30 Ft Test Processing
n30spo2 = n30test(:,88);
n30spo2(n30spo2 == 0) = [];
n30co = n30test(:,89);
n30co(n30co == 0) = [];
clear n30test;
%% 40 Ft Test Processing
n40spo2 = n40test(:,88);
n40spo2(n40spo2 == 0) = [];
n40co = n40test(:,89);
n40co(n40co == 0) = [];
clear n40test;
This snippit uses about an extra 60-90 MB of memory when compared to the memory before that point which is cleared before every break when I am done with it. The first array is a double of size 70841x98 while the others become around 450x1 to 900x1. These are not difficult arrays to deal with by a long shot. Yet it will crash unless I put in those breakpoints, then I can just press continue and it's fine.
I've also tried using clear -v
but that crashed too unless I used breakpoints.
Now, I debugged with visual studio and got this error:
No symbol file loaded for liboctgui-3.dll
as well as and error that it was trying to access 0xFFFFFFFFFFFFFFFF
and it got "permission denied" trying to access it. Why on earth would it be trying to access the last memory block?
This actually doesn't happen if I don't clear any variables. It will take up the extra 1 -1.4 GB happily. Is this a known issue? releasing memory shouldn't cause a program to attempt to access the very last possibly memory block.