-
Java Heap Problem
When loading or saving large XML files, MATLAB sometimes reports problems due to insufficient heap memory for the Java Virtual Machine.
You can increase the heap space for the Java VM in MATLAB 6.0 and higher by creating a java.opts file in the $MATLAB/bin/$ARCH (or in the current directory when you start MATLAB) containing the following command:
-Xmx$MEMSIZE
Recommended:
-Xmx536870912
which is 512Mb of heap memory.An additional workaround reported by Mauro Hueller in case the above doesn't work: What happens with Matlab2007b on WinXP is that after you create the java.opts file, Matlab actually doesn't start (it crashes after the splashscreen). The workaround I found is setting an environment variable MATLAB_RESERVE_LO=0.
HOWTO:- Select Start->Settings->Control Panel->System
- Select the "Advanced" Tab
- On the bottom, center, click on "Environment variables"
- Click "New" (I choose the one under "User variables for CurrentUser")
Variable Name: MATLAB_RESERVE_LO
Variable Value: 0 - Click OK as many times it needs
[As far as I remember, it shouldn't ask for reboot. ]
Then edit/reate the java.opts file. You can also specifying the units (for instance -Xmx512m or -Xmx524288k or -Xmx536870912 will all give you 512 Mb).
MAC OS X, 2011a: I've found it necessary to include both a minimum and maximum heap size on this platform. For example:
-Xms256m
-Xmx512m -
Known Issue installing extension modules in LTPDAprefs
On Mac OS X versions which use java 1.7 (on newer versions of MATLAB) there is an issue with the LTPDAprefs GUI when selecting paths of extension modules. There is a bug in the underlying java file-chooser widget which means there is an ‘Open’ button instead of a ‘Choose’ button. The result is that you can’t select a directory but must, instead, select a file (for example the .xml file in the extension) then delete the filename from the path before pressing the + button to add the extension.