How does Matlab use less memory after exceeding physical limit?

1 次查看(过去 30 天)
I have a code which normally requires about 17 GB of memory, since there is a matrix which is about 12+ GB which is continually called using much smaller index matrices. However, when I run the code on a machine with 16 GB physical memory, MATLAB will reach this limit, then have some trouble for about 10 minutes, windows will freeze while appearing to writing data to the disk. But eventually MATLAB will continue running normally while only using about 4-6 GB memory. How does this happen? The code doesn't seem to be significantly slower. Has MATLAB written some kind of file which contains my large variable and somehow transfers are still fast even though I only have a normal HDD?
Since this continuous read from the HDD turns out to be reasonably fast in my code, how can I tell matlab to always do this with some huge variables, so that I can substantially increase the sizes of my matrices without freezing windows?
Thanks.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Performance and Memory 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by