Running out of heap space

廉价感情. 提交于 2019-12-03 04:55:33

IOConsole is an eclipse class, not your program's. Are you printing to System.out a lot? Under Window > Preferences search for "console". Set some sort of limit for all the console buffers. Try printing less output from the program. Maybe log to a file instead.

You can add the following JVM args to give you an idea of the memory usage and what the GC is doing:

-Xloggc:/tmp/gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps

This problem has occured due to the buffer size in console.

Solution :

Right Click the Console -> Preferences

limit the console.

I encountered the problem and I tried to solve it by changing heap and buffer settings in eclipse. However I couldn't solve it. Then I noticed there is a memory leak in my program and the number of threads increase in time. The problem was solved after I had fixed the bug. I think memory leak is not the most probable reason for it but it should be considered.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!