Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从内存监视器图 (http://i.stack.imgur.com/sBKzO.png) 中可以看出,下午 4:35 左右是我启动 VisualVM Profiler 的时间,它导致内存使用量下降了约 7G,这非常重要. 为什么会这样?就好像启动分析器允许回收更多的内存对象——但为什么在此之前的许多 GC 轮次中没有对它们进行垃圾收集呢?
(大约 4:49 是我在 Profiler 中单击“快照”时,出现了类似的下降,但程度较小。)
我很困惑,如果有人能对这种行为有所了解,我将不胜感激。谢谢!
附加分析器可能会触发更多完整的 GC,这将减少短暂使用的内存。