MATLAB: Do I get a ‘Cache memory is Exhausted’ when I am working on some data sets in MATLAB 7.1 (R14SP3)

MATLAB

I am running simulations which are computationally intensive. However, when I run one particular case, I receive an error message saying:
Cache Memory is Exhausted
My data is not memory intensive so this cannot be an 'Out of Memory' issue.

Best Answer

This is not exactly an "Out of memory" issue but the symptoms and cause are the same.
In this case too many small objects have been allocated which causes the 'Cache memory is exhausted' warning messages.
However, you have several options:
1) You can upgrade the version of MATLAB you are currently using.
2) If that is not an option, you can use the "fast" memory manager which should be the default in MATLAB 7.1 (R14SP3). If you type:
feature PrintMemoryCacheStats 1
at the MATLAB command prompt, it will show what memory manager is in use (in the first line) and give quite a bit of information on the current cache state.
3) If the fast memory manager is already in use, you can try the "system" memory manager but then you may find out that then a normal 'out of memory' is unpreventable.