- computer memory (aka "primary storage") is used by the OS to load programs into and store data while they are being processed. Must be fast to access (to match the CPU speed) and is thus expensive.
- hard-drive (aka "secondary storage", also includes tape drives, optical drives, etc.) are used for non-volatile storage. These days is often quite cheap (per bit), but in general can be much slower to access than volatile memory.
Can I fix 'Out of Memory' error by attaching an external drive?
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lina Gannon
am 12 Apr. 2021
Bearbeitet: Stephen23
am 13 Apr. 2021
I have an external hard drive with lots of storage, I am not sure how much space my computer has, but probably not a ton so I am hoping this will help. I moved the matlab file to the external drive and tried to run it there and had the same issue.
I am running a kinda big computation, I am making a 9000*9000 matrix, but as soon as I make it right, I use sparse, but overall still a big computation going on.
If the drive can help, how can I make my computer utilize that space?
Thank you!
1 Kommentar
Stephen23
am 13 Apr. 2021
Bearbeitet: Stephen23
am 13 Apr. 2021
"I am not sure how much space my computer has, but probably not a ton so I am hoping this will help."
In general no: a hard-drive is not primary computer memory. Although it is possible to configure the OS to use the hard-drive as part of virtual memory, this generally slows down data processing. There is no real subsitute for fast computer memory.
"space" is an ambiguous term, it is not clear if you are referring to computer memory or data storage.
"I moved the matlab file to the external drive and tried to run it there and had the same issue."
Of course, because changing where files are saved does not change the computer memory (which is what MATLAB uses for the data when it is imported).
Akzeptierte Antwort
David Fletcher
am 12 Apr. 2021
Unfortunately a hard disk is a poor alternative to physical RAM. Whilst it is possible to get Windows to use the hard disk as virtual memory, it is a painfully slow alternative. If you want to try it, have a look here, or google setting up virtual memory.
2 Kommentare
David Fletcher
am 12 Apr. 2021
Bearbeitet: David Fletcher
am 12 Apr. 2021
Given the size, I'm guessing it's an SSD - this will be faster than the older mechanical hard drives, but they are still not really designed as a substitute for physical RAM and are still many orders of magnitude slower than the dedicated RAM inside your computer. The size of the pagefile is generally recommended to be between 1.5 to 4 times the size of your physical memory.
Weitere Antworten (0)
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!