|Programming and Data Types|
"Out of Memory" Errors
Typically, MATLAB generates an
Memory message whenever it requests a segment of memory from the operating system that is larger than what is currently available. When you see this message, use any of the techniques discussed earlier in this section to help optimize the available memory.
Memory message still appears, you can try any of the following:
limitcommand to check).
Increasing the System Swap Space
How you set the swap space for your computer depends on what operating system you are running on.
UNIX. Information about swap space can be procured by typing
pstat -s at the UNIX command prompt. For detailed information on changing swap space, ask your system administrator.
Linux. Swap space can be changed by using the
swapon commands. For more information on the above commands, type
command_name at the Linux prompt.
Windows 98, Windows NT, and Windows ME. Follow the steps shown here:
Windows 2000. Follow the steps shown here:
Running MATLAB Without the Java Virtual Machine
You are more likely to encounter
Memory errors when using MATLAB Version 6.0 or greater due to the use of the Java Virtual Machine (JVM) within MATLAB. The JVM and MATLAB use the same virtual address space, leaving less memory available for your MATLAB applications to use.
MATLAB uses the JVM to implement its GUI-based development environment. You are encouraged to use this environment for your application development work. However, if you get
Memory errors while running memory intensive applications, and you are running MATLAB on a UNIX platform, you may want to run these without the JVM.
On UNIX systems, it is possible to run MATLAB without the JVM by starting MATLAB with a
-nojvm switch. Type the following at the UNIX prompt:
When you use this option, you cannot use the desktop or any of the MATLAB tools that require Java.
|Ways to Conserve Memory||Platform-Specific Memory Topics|