Possible Duplicate:
Why there is memory usage difference between xmx and top?
I run a java program using
java -Xms32m -Xmx64m xxxclassname
but from top command, I know there is a birst of memory which is nearly 200MB. Why it is not less than 64MB as specified in the Xmx option?
You’re specifying the maximum size of the garbage-collected heap. There are other aspects to Java memory consumption, including native code (not just the JVM, but also any native libraries loaded with JNI) and PermGen space. (PermGen space can be tuned somewhat, but you really don’t want to confine it too much, or your program will crash.)