Usage:
You can set maximum size in bytes for with:
-XX: MaxHeapSize=size[units], where size is the amount of memory in bytes of your choice.
Examples:
To set minimum value for heap at 80MB use:
-XX:MaxHeapSize=83886080
-XX:MaxHeapSize=81920k
-XX:MaxHeapSize=80m
Description:
Sets the maximum size (in byes) of the memory allocation pool. This value must be a multiple of 1024 and greater than 2 MB. Append the letter k or K to indicate kilobytes, m or M to indicate megabytes, or g or G to indicate gigabytes. The default value is selected at run time based on the system configuration. For server deployments, the options -XX:InitialHeapSize and -XX:MaxHeapSize are often set to the same value.
Default Value:
Default value is system-dependent.
Errors:
None
Arguments related:
TODO link MinHeapFreeRatio, MaxHeapFreeRatio, Xmx, Xms, InitialHeapSize
Related Posts
NOTE:
If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.
Edit your Comment