matlab java mac_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 0818b9ca8b590ca3270a3433284dd417.png 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 http://www.oracle.com/technetwork/java/javase/index-138283.html.

不卡的解决方案:

关闭version control

在Preferences->General->Source Control->NOT Enable MathWorks source control integration.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值