memory - How to prevent MatLab from freezing? -
is there way limit amount of time evaluation allowed run? or limit amount of memory matlab allowed take doesn't freeze laptop?
let's answer questions 1 @ time:
question #1 - can limit amount of time matlab takes execute script?
as far know, not possible. if want this, need multi-threaded environment 1 thread actual job while thread keeps eye on timer... functionality, afaik, matlab not have supported. way stop script running if punch ctrl + c / cmd + c. depending on being executed... example mex script or lapack routine, or simple matlab script, may work pushing once... or may have mash sequence like maniac.
(note: above image introduced try , funny. if don't know image from, it's movie flashdance , 1 of songs soundtrack she's maniac, i've provided youtube link song above.)
see post more details: how can interrupt matlab when gets really busy?
question #2 - can limit amount of memory matlab uses?
yes can. have seen in posts, you're using windows. can change changing page size of virtual memory used computer. specifically, instead of allowing grow dynamically, set size , once matlab exhausts that, it'll give out-of-memory error rather freezing computer.
see post mathworks forums more insight:
http://www.mathworks.com/matlabcentral/answers/12695-put-a-limit-on-memory-matlab-uses
also see guide mathworks on how handle out-of-memory errors:
http://www.mathworks.com/help/matlab/matlab_prog/resolving-out-of-memory-errors.html
finally, take @ link on how change / modify page size of computer via windows:
http://windows.microsoft.com/en-ca/windows/change-virtual-memory-size#1tc=windows-7
Comments
Post a Comment