Java显示错误java.lang.OutOfMemoryError

时间:2017-03-09 16:03:30

标签: java graph-theory subgraph

我下载了Parsemis程序。它是从java创建的频繁子图挖掘程序。我在parsemis中使用的数据非常大。

我尝试在Windows10中运行java parsemis,添加 -Xmx4096M 它会显示如下错误。这个问题的原因是什么?如何解决?

java -Xmx4096M -jar parsemis-2008-12-01.jar --graphFile=graph_all.lg --outputFile=output.lg --minimumFrequency=10%

它显示错误。

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at de.parsemis.graph.HPListGraph.<init>(HPListGraph.java:207)
        at de.parsemis.graph.HPListGraph.clone(HPListGraph.java:378)
        at de.parsemis.graph.HPListGraph.clone(HPListGraph.java:41)
        at de.parsemis.algorithms.gSpan.RightMostExtension.add(RightMostExtension.java:110)
        at de.parsemis.algorithms.gSpan.RightMostExtension.extend(RightMostExtension.java:213)
        at de.parsemis.algorithms.gSpan.RightMostExtension.call(RightMostExtension.java:150)
        at de.parsemis.miner.chain.GenerationStep.call(GenerationStep.java:94)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.call(GSpanGeneration.java:101)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:210)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:187)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:187)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:187)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:187)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:187)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:187)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:187)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)
        at de.parsemis.algorithms.gSpan.GSpanGeneration.searchEmbeddings(GSpanGeneration.java:213)

1 个答案:

答案 0 :(得分:0)

尝试在块中执行此操作,可能是因为一大块代码永远不会超出范围,内存空间不会被释放,作为回报,操作系统进入一段时间后,终止程序并尝试释放内存位置