increasing matlab memory size

5 views (last 30 days)
Chandrajit
Chandrajit on 21 Jan 2013
I am running on Windows7 with RAM of 3B. I am having the problem of OUT OF MEMORY in running a simulation in Simulink. When I gave the command of 'memory', I got the following :
memory
Maximum possible array: 1023 MB (1.072e+09 bytes) *
Memory available for all arrays: 2418 MB (2.536e+09 bytes) **
Memory used by MATLAB: 380 MB (3.988e+08 bytes)
Physical Memory (RAM): 3033 MB (3.180e+09 bytes)
* Limited by contiguous virtual address space available.
** Limited by virtual address space available.
Here memory used by MATLAB is showing only 380MB. How can its size be increased and by how much?
Please give a solution as I am stuck up as MATLAB is running too slow and I am also unable to log data.
Regards and thnks in advance

Accepted Answer

Walter Roberson
Walter Roberson on 21 Jan 2013
"Memory used by MATLAB" is internal memory used by the MATLAB interpreter itself, as opposed to memory allocated to user variables. Low is good for "Memory used by MATLAB" as the memory used by MATLAB itself is not available to user variables.
With your system set up as it is, you could use individual arrays up to 1 gigabyte, and more than 2 gigabytes total between all of your arrays.
To speed up MATLAB, what you should do is reduce the Swap Space you have allocated to the system. Especially if you set the swap space to 0, everything in the system will run in RAM, which would be faster than going to the hard disk. Of course if you do that, then you will only be able to use much smaller arrays than you can use now, since the operating system and other programs will be using up some of your 3 Gb physical RAM.
What would really be recommended is to add more physical memory to your system. You might need to also switch to the 64 bit of MATLAB to take best advantage of the extra memory. But if you are using Student Version then I seem to recall there is only the 32 bit version of that on MS Windows or Linux.
  1 Comment
Jan
Jan on 21 Jan 2013
I agree: Install more RAM and run a 64 bit system is the best method to increase the size of usable RAM.

Sign in to comment.

More Answers (0)

Categories

Find more on Image Processing Toolbox 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!