Matlab for mac卡頓、拋Java異常
在蘋果上使用Matlab後,試用了幾個版本後都十分卡頓,後來丟擲了Java.lang.OutOfMemoryError.
後查閱資料認為可能是Matlab JVM記憶體不夠的問題。官方給出的解決方案如下,將JVM記憶體設定到最大後,情況有所緩解。有時候仍然有些卡
但是我終於找到了一個不卡的解決方案。請往下看
Java Heap Memory Preferences
You can adjust the amount of memory that MATLAB® software allocates for Java® objects.
Note: The default heap size is sufficient for most cases. |
To adjust the Java heap size:
-
On the Home tab, in the Environment section, click Preferences. Select MATLAB > General > Java Heap Memory.
-
Select a Java heap size value using the slider or spin box.
Note: Increasing the Java heap size decreases the amount of memory available for storing data in arrays.
-
Click OK.
-
Restart MATLAB.
If the amount of memory you specified is not available upon restart, MATLAB resets the value to the default, and displays an error dialog box. To readjust the value, repeat the previous steps.
If increasing the heap size does not eliminate memory errors, check your Java code for memory leaks. Eliminate references to objects that are no longer useful. For more information, see the Java SE Troubleshooting guide at
不卡的解決方案:
關閉version control
在Preferences->General->Source Control->NOT Enable MathWorks source control integration.