Does Matlab Use All of a PC's Memory?

2 vues (au cours des 30 derniers jours)
David Koenig
David Koenig le 20 Déc 2011
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.

Réponse acceptée

Sean de Wolski
Sean de Wolski le 20 Déc 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 commentaires
Jason Ross
Jason Ross le 20 Déc 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
Malcolm Lidierth le 20 Déc 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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Performance and Memory dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by