Can I control how much shared memory Matlab can access?
Show older comments
I'm running Matlab 2013 on Windows 7. In Task Manager I can see that I have 1.7 GB of free memory and 2.6 GB of cached/shared/standby memory. Seems like I can only use the free memory - if Matlab tries to use more it gives me an out of memory error. Why can't it access the cached memory? Is there a setting I can change to allow Matlab to access it?
2 Comments
Walter Roberson
on 27 Jul 2017
Are you using 32 bit or 64 bit MATLAB and Windows?
Courtney
on 27 Jul 2017
Answers (2)
Walter Roberson
on 27 Jul 2017
1 vote
That appears to not be under control of MATLAB; see https://serverfault.com/questions/565539/huge-amount-of-standby-memory-in-resource-monitor
3 Comments
Courtney
on 27 Jul 2017
Walter Roberson
on 27 Jul 2017
Possibly you have a different process eating memory when combined with a page file that is too small. See https://superuser.com/questions/173838/how-do-i-make-windows-7-less-aggressive-in-caching-memory
Courtney
on 27 Jul 2017
Jan
on 27 Jul 2017
You do not need only 1.7GB of RAM to allocate an array using 1.7GB, but this memory must be available as a contiguous block in addition. So perhaps Matlab uses the memory called "cached/shared/standby" (I'm not sure what this exactly means), but neither the free nor this memory includes a free block which is large enough.
Can you post the code, which causes the problem and the output of
feature memstats
You know the standard answer for out of memory problems? I've tried a lot of tricks and strategies. I've started programming on a ZX81 with 1kB and expanded it to 16kB RAM soon. Later I've struggeled with a 192MB Windows 2000 and 512MB Win2K machines. And after all these years of experiences with squeezing my data into the memory, I promise that this is the only reliable solution:
Install more RAM.
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!