Out of Memory error
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Akzeptierte Antwort
Rik
am 23 Aug. 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 Kommentare
John D'Errico
am 23 Aug. 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
Weitere Antworten (1)
Image Analyst
am 23 Aug. 2022
Bearbeitet: Image Analyst
am 23 Aug. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!