Matlab 报错 Error java.lang.OutOfMemoryError: GC overhead limit exceeded 解决

来源:互联网 发布:java大牛的博客 编辑:程序博客网 时间:2024/05/21 09:56

在跑《Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields》这篇论文的evaluation代码https://github.com/ZheC/Realtime_Multi-Person_Pose_Estimation时报错。

java.lang.OutOfMemoryError: GC overhead limit exceeded    at com.android.dx.dex.code.OutputFinisher.findExpandedOpcodeForInsn(OutputFinisher.java:525)    at com.android.dx.dex.code.OutputFinisher.calculateReservedCount(OutputFinisher.java:466)    at com.android.dx.dex.code.OutputFinisher.reserveRegisters(OutputFinisher.java:402)    at com.android.dx.dex.code.OutputFinisher.finishProcessingAndGetList(OutputFinisher.java:358)    at com.android.dx.dex.code.DalvCode.finishProcessingIfNecessary(DalvCode.java:108)    at com.android.dx.dex.code.DalvCode.getInsns(DalvCode.java:185)    at com.android.dx.dex.file.CodeItem.place0(CodeItem.java:223)    at com.android.dx.dex.file.OffsettedItem.place(OffsettedItem.java:242)    at com.android.dx.dex.file.MixedItemSection.placeItems(MixedItemSection.java:312)    at com.android.dx.dex.file.DexFile.toDex0(DexFile.java:543)    at com.android.dx.dex.file.DexFile.toDex(DexFile.java:216)    at com.android.dx.command.dexer.Main.writeDex(Main.java:574)    at com.android.dx.command.dexer.Main.run(Main.java:218)    at com.android.dx.command.dexer.Main.main(Main.java:174)    at com.android.dx.command.Main.main(Main.java:95)

实际上不是cpu或者gpu的超过内存。是为matlab 为 java heap分配的内存通常只有一二百兆,有时不够,通过以下修改可以解决问题。


阅读全文
0 0
原创粉丝点击