views:

57

answers:

1

I execute the following command:

java -Xms1024M -Xmx1024M mypackage.MyClass

I expect that resources are captured by JVM immediately, but in fact my resource manager is showing that 7.2M was captured by JVM.

Does anybody know what is the reason?

PS: The documentation (man java) says about the option the following:

-Xmsn

Specify the initial size, in bytes, of the memory allocation pool. This value must be a multiple of 1024 greater than 1MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration. For more information, see HotSpot Ergonomics Examples:

-Xms6291456

-Xms6144k

-Xms6m

EDIT:

java -version

returns:

java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.1) (6b18-1.8.1-0ubuntu1~9.10.1)
OpenJDK Server VM (build 16.0-b13, mixed mode)

OS: 9.10 - the Karmic Koala

+2  A: 

Note that the documentation does NOT say that "G" is an allowed suffix. Try with 1024M instead of 1G.

Paul Tomblin
Absolutely the same effect, I rewrite the question.
Tim