Does Java Garbage Collect always has to “Stop-the-World”?

前端 未结 4 1435
旧巷少年郎
旧巷少年郎 2021-02-04 08:32

I am trying to understand Java\'s garbage collection more deeply.

In HotSpot JVM generational collection, in the heap, there are three areas (Young generation, Old gener

4条回答
  •  太阳男子
    2021-02-04 09:15

    Stop-the-world will occur no matter which GC algorithm you choose. Stop-the-world means that the JVM is stopping the application from running to execute a GC. When stop-the-world occurs, every thread except for the threads needed for the GC will stop their tasks.

提交回复
热议问题