G
GNS
I have a java web application running on Sun Solaris 10 platform, the
java version is 1.5.0. Recently I found when I used TOP command to get
the memory used by my application it was over 1.5GB and kept
increasing. However when using the java.lang.Runtime.totalMemory() and
freeMemory() methods from my code the memory usage was way lower than
the size reported by TOP. From totalMemory() and freeMemory() method
calls I could see that there did not seem to have a memory leak in my
code and the GC was working properly however memory use reported by TOP
never decreased meaning that the GC never got kicked off???
Thanks,
Richard.
java version is 1.5.0. Recently I found when I used TOP command to get
the memory used by my application it was over 1.5GB and kept
increasing. However when using the java.lang.Runtime.totalMemory() and
freeMemory() methods from my code the memory usage was way lower than
the size reported by TOP. From totalMemory() and freeMemory() method
calls I could see that there did not seem to have a memory leak in my
code and the GC was working properly however memory use reported by TOP
never decreased meaning that the GC never got kicked off???
Thanks,
Richard.