Out of Memory error
26 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, The "maximum possible array" is much lower than the physical memory leading to out-of-memory error. Is there any way I can increase the max possible array? Thanks
>> memory
Maximum possible array: 5176 MB (5.427e+09 bytes) *
Memory available for all arrays: 5176 MB (5.427e+09 bytes) *
Memory used by MATLAB: 2040 MB (2.139e+09 bytes)
Physical Memory (RAM): 32768 MB (3.436e+10 bytes)
* Limited by System Memory (physical + swap file) available.
0 commentaires
Réponse acceptée
Rik
le 23 Août 2022
Matlab stores arrays in contiguous blocks of memory. I have always interpreted that to mean it cannot cross RAM-sticks (so if you have multiple 16GB sticks you can only have 16GB for each array). I don't know whether that interpretation is correct (probably not).
2 commentaires
John D'Errico
le 23 Août 2022
I don't think that is at least completely true. Say you have only 8GB of RAM.
1 - Create a double precision variable (V1) that uses 5GB of RAM.
2 - Create a scalar double precision variable (V2)
At this point, you have two variables in memory.. The memory map will have that little scalar sitting out in the wees. but where can it go?
3 - Next, clear V1
V2 does not change its location in memory. You now have two blocks of contiguous memory to be found, so even though you have 8 GB of RAM, you have only a maximum block of 5GB of contiguous memory. Clearing V2 will remove that limitation, or performing a pack command can help.
help pack
You can of course get some information about the memory available to you using the memory conmmand, (but only on Windoze systems.)
help memory
Plus de réponses (1)
Image Analyst
le 23 Août 2022
Modifié(e) : Image Analyst
le 23 Août 2022
You have 32 GB of physical RAM but how much swap space have you set up? Why don't you just increase the amount of swap space?
0 commentaires
Voir également
Catégories
En savoir plus sur Logical 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!