Heap space out of memory

前端 未结 9 1761
梦如初夏
梦如初夏 2020-11-27 04:33

My application currently consumes quite a lot of memory because it is running physics simulations. The issue is that consistently, at the 51st simulation, Java will throw an

9条回答
  •  抹茶落季
    2020-11-27 05:01

    Try adding -Xmx for more memory ( java -Xmx1024M YourClass ), and don't forget to stop referencing variables you don't need any more (memory leaks).

提交回复
热议问题