Heap space out of memory

前端 未结 9 1791
梦如初夏
梦如初夏 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:15

    I would like to add that this problem is similar to common Java memory leaks.

    When the JVM garbage collector is unable to clear the "waste" memory of your Java / Java EE application over time, OutOfMemoryError: Java heap space will be the outcome.

    It is important to perform a proper diagnostic first:

    • Enable verbose:gc. This will allow you to understand the memory growing pattern over time.
    • Generate and analyze a JVM Heap Dump. This will allow you to understand your application memory footprint and pinpoint the source of the memory leak(s).
    • You can also use Java profilers and runtime memory leak analyzer such as Plumbr as well to help you with this task.

提交回复
热议问题