Does Matlab Use All of a PC's Memory?
2 views (last 30 days)
Show older comments
My laptop (Toshiba Satellite) has 1 GB of memory. I do a lot of work with wav files and I often get "out of memory" errors. If I upgrade to a laptop with more memory will Matlab use it? Thanks.
0 Comments
Accepted Answer
Sean de Wolski
on 20 Dec 2011
Sure. 32 bit MATLAB still has a threshold of around 4gb maximum but 64bit MATLAB on a 64 bit machine can have as big an array as you have memory (well up until 2^64-1)
Also see:
3 Comments
Jason Ross
on 20 Dec 2011
Also note that pretty much any 32-bit OS has some limit around 4GB. You can use tricks like PAE to try and eke a little more out of it, but the processes themselves will still have limits.
If one is consistently running out of memory with their work, there is really no reason to not move to 64-bit -- on a Mac, Windows or Linux. RAM is also pretty inexpensive these days, as well.
Malcolm Lidierth
on 20 Dec 2011
Even on a 64 bit system, MATLAB can be slow when the size of a matrix exceeds the available RAM and virtual memory is used. For example, pre-allocating 8Gb to a double precision array on a 4Gb Mac takes 120+ seconds.
Using a 8Gb scratch file and memory mapping that can speed things up: for 8Gb array above by 100x.
I have just posted a VVAR class to the FEX that helps with that (not on-line at the time of writing but should be soon). See:
http://www.mathworks.com/matlabcentral/fileexchange/authors/23816
More Answers (0)
See Also
Categories
Find more on Performance and Memory 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!