翻了好多资料,还是不能很好地回答楼主的这个问题!,提供一些信息看是不是能帮到楼主吧。
VIRT是一个虚拟的值,man top的解释:
The total amount of virtual memory used by the task. It includes all code, data and shared libraries plus pages that have been swapped out. (Note: you can define the STATSIZE=1 environment variable and the VIRT will be calculated from the /proc/#/state VmSize field.)
这个值记录的东西跟程序现在用的内存完全是两回事,而且可能会随着程序运行不断增加,楼主要关注的应该是RES这列的内容
另外还有一个问题,楼主的机器内存只有512M,JVM的参数Xmx设置成1000m不会有什么问题吗?