Sometimes when you ask matlab to create a very large array, it exceeds
actual ram and tries to go into harddisk, which slows down the computer
Uhh, sort off. What actually happens is that windows doees not assign RAM. It assign virtual address space (as you can see in the commit charge).
When it needs to use this asigned space it will try to use free RAM.
If there is no free RAM then it will try to free some. E.g. by writing some information from memory to the pagefile.
Tis is not an per application situation, but something with all memory usage on the system.
so much that it becomes impossible to close matlab, only choice is to use the power button.
The most likely problem here is that you have one application which triggers a lot of diskIO. That disk is shared by other applications and the OS. Which means that the OS also slows down.
- Somehow limit matlab to have capped memory. Job objects might do the trick, though I never used it.
- Or get much faster IO. (mitigates IO slow down).
- or run matlab in a VM (you can limit the VMs memory).