开发者

Reconciling outputs of jconsole and top

I am trying to look at memory management in Java. I have a program that creates a large collection (~500MB). I run java without any special arguments. Once this collection goes out of scope, I invoke the garbage collector using System.gc(). From jconsole, I can see that the heap memory in use is dramatically reduced. The same cannot be said of the RES output of the top linux command开发者_如何学Python.

My only interpretation is that once the JVM gets hold of memory, it does not release it to the system as long as it is running. Is this correct?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜