Increase memory used by Matlab
135 次查看(过去 30 天)
显示 更早的评论
I have Windows 7 (64 bits) and I would like to increase the performance of Matlab (version R2011b). I would like to know how to configure Windows to let Matlab to use more memory, because I think 513MB of 24GB is too low. The memory state is as follows:
<<
Maximum possible array: 45917 MB (4.815e+010 bytes) *
Memory available for all arrays: 45917 MB (4.815e+010 bytes) *
Memory used by MATLAB: 513 MB (5.382e+008 bytes)
Physical Memory (RAM): 24574 MB (2.577e+010 bytes)
* Limited by System Memory (physical + swap file) available.
>>
Can anyone help me?
Thank you very much in advance.
Gil
2 个评论
Wenlong
2012-7-26
Hi, Gil
May I know how to increase the memory size like you did?
Physical Memory (RAM): 24574 MB (2.577e+010 bytes)
Did you reset the virtual memory or just buy extra memory?
Many thanks in advance.
Best wishes Wenlong
KingLizard111
2014-6-9
Hi, can I ask you how did you manage to have such a big Maximum possible array size?
Thank you
采纳的回答
Jan
2012-3-15
The 513 MB means the currently used memory. This is increased automatically, when you define new arrays. "Memory available for all arrays: 45917 MB" seems like you are using a large virtual memory block, because you have installed 24 GB only.
6 个评论
Jason Ross
2012-3-15
So if the memory used is only 282MB and the CPU is idling, I would guess that you are doing something else that is limiting the speed of execution -- are you reading a file from a disk or network?
But as Jan says, this quickly becomes a guessing game without knowing what is going on in the code.
Frederick
2014-11-23
Hi, I'm having the same problem as above, and I know it's because my script is written very badly. Would you mind helping me out with this? The piece of code taking hours and hours to calculate is:
Fr = zeros(length(omega_interp),t_end);
Fi = zeros(length(omega_interp),t_end);
for t = 1:t_end;
for i=1 : length(omega_interp);
for j = i+1 : length(omega_interp);
Fr(i,t) = Fr(i,t) + 2*sum(Amp(i)*Amp(j).*(QTFREAL_Final(i,j)+QTFREAL_Final(j,i)) .* cos(((omega_interp(i)-omega_interp(j))*t)+(eps(i)-eps(j))));
end
end
end
end
So what I want to do is compute (Second order wave drift forces) over time (thats the first for loop), over varying frequency (hence the two for loops in my script). I know matlab is better with matrices, however, i get a bit lost with the cos((omega(i)-omega(j))*t)
更多回答(1 个)
Daniel Shub
2012-3-15
If memory is available and MATLAB can benefit from it, MATLAB will uses it. When MATLAB doesn't need the memory anymore, it gives it back. You can see this with:
memory
Memory used by MATLAB: 262 MB (2.747e+008 bytes)
x = randn(1e8, 1); % This is all my poor little Windows box can handle
memory
Memory used by MATLAB: 1025 MB (1.075e+009 bytes)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!