I want to limit the maximum memory used by the JVM. Note, this is not just the heap, I want to limit the total memory used by this process.
use the arguments -Xms<memory>
-Xmx<memory>
. Use M
or G
after the numbers for indicating Megs and Gigs of bytes respectively. -Xms
indicates the minimum and -Xmx
the maximum.