Programming Previous page   Next Page

Increasing 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 mkswap and swapon commands. For more information on the above commands, type man followed by the command name at the Linux prompt.

Windows NT

Follow the steps shown here:

  1. Right-click the My Computer icon, and select Properties.
  2. Select the Performance tab and click the Change button to change the amount of virtual memory.

Windows 2000

Follow the steps shown here:

  1. Right-click the My Computer icon, and select Properties.
  2. Select the Advanced tab and click the Performance Options button.
  3. Click the Change button to change the amount of virtual memory.

Windows XP

Follow the steps shown here:

  1. Right-click on the My Computer icon, and select Properties.
  2. Select the Advanced tab and click the Performance Settings button.
  3. Click the Change button to change the amount of virtual memory.

Freeing Up System Resources on Windows Systems

There are no functions implemented to manipulate the way MATLAB handles Microsoft Windows system resources. Windows uses system resources to track fonts, windows, and screen objects. Resources can be depleted by using multiple figure windows, multiple fonts, or several UI controls. One way to free up system resources is to close all inactive windows. Windows icons still use resources.

Reloading Variables on UNIX Systems

On UNIX systems, MATLAB does not return memory to the operating system even after variables have been cleared. This is due to the manner in which UNIX manages memory. UNIX does not accept memory back from a program until the program has terminated. So, the amount of memory used in a MATLAB session is not returned to the operating system until you exit MATLAB.

To free up the memory used in your MATLAB session, save your workspace variables, exit MATLAB, and then load your variables back in.


Previous page  Resolving "Out of Memory" Errors Programming Tips Next page

© 1994-2005 The MathWorks, Inc.