Clear Filters
Clear Filters

Out of memory: Have to restart matlab

2 views (last 30 days)
susan
susan on 22 Jun 2012
Hello,
Is there something besides 'pack ' and 'clear' to avoid having to restart matlab when working with large files (~500 MB) on a 4GB memory (Macbook Air) laptop?
Thanks, S
  2 Comments
Walter Roberson
Walter Roberson on 22 Jun 2012
Note: If you use large arrays in MS Windows, then memory fragmentation will eventually require you to restart to get an array of maximum size.
I do not know the situation for OS-X.
I have never encountered this kind of situation on MATLAB for 64 bit Linux.
Ryan G
Ryan G on 22 Jun 2012
In windows there is the memory shield option
http://www.mathworks.com/help/techdoc/ref/matlabwindows.html
(search shieldoption)
Unfortunately I was not able to find a mac equivalent but this might help you find something.

Sign in to comment.

Answers (2)

Ken Atwell
Ken Atwell on 25 Jun 2012
Are you using a new-ish version of (64-bit) MATLAB on your Mac, or and older 32-bit version? I ask because 64-bit addressing should go a very long way to avoiding out-of-memory errors due to fragmentation.
Can you tell us what version of MATLAB you are using, and be more specific about the problems you are encountering that force you to restart MATLAB?
  3 Comments
Ken Atwell
Ken Atwell on 25 Jun 2012
Thanks for the clarification. R2007b was a 32-bit release, and fragmentation over time is inevitable. If you have the means to migrate to newer 64-bit version (10b and later are only available in 64-bit form), I believe you will have a much better experience.
If you must remain on 32-bit MATLAB, Ryan's suggestions are probably the best you can do.
Walter Roberson
Walter Roberson on 25 Jun 2012
The MacBook Air with 4Gb was not released until 2011. The supported operating systems for that generation of MacBook Air are Lion and Mountain Lion. R2007b is, however, not supported on either of those: the earliest version supported on Lion is R2009a.
The hardware and software combination being used is thus not supported.
http://en.wikipedia.org/wiki/MacBook_Air#Specifications
http://support.apple.com/kb/HT1159

Sign in to comment.


Ryan G
Ryan G on 22 Jun 2012
You can try utilizing
clear all; clear mex; clear functions;
to dig a little deeper while clearing but my guess is this would still eventually lead you OOM with no out.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!