0 votes
in JAVA by (23.1k points)
What does Java option -Xmx stand for?

1 Answer

0 votes
by (23.1k points)

Specify the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is 64MB. The upper limit for this value will be approximately 4000m on Solaris 7 and Solaris 8 SPARC platforms and 2000m on Solaris 2.6 and x86 platforms, minus overhead amounts. Examples:




So, in simple words, you are setting Java heap memory to a maximum of 1024 MB from the available memory, not more.

Notice there is NO SPACE between -Xmx and 1024m

It does not matter if you use uppercase or lowercase. For example: "-Xmx10G" and "-Xmx10g" do the exact same thing.
Click here to read more about JAVA
Click here to read more about Insurance

Related questions

0 votes
asked Apr 8, 2021 in JAVA by SakshiSharma (30.6k points)
+2 votes
asked May 13, 2021 in JAVA by rajeshsharma (23.1k points)