Can I control how much shared memory Matlab can access?

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?

Answers (2)

3 Comments

Thanks, that makes sense. Is there a way to downgrade the priority of the files in the cache?
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
I don't see any program eating memory in the Resource Monitor...

Sign in to comment.

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.

1 Comment

Unfortunately, I've already maxed out the RAM on this computer.

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Asked:

on 27 Jul 2017

Commented:

on 27 Jul 2017

Community Treasure Hunt

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

Start Hunting!