According to this link, there is an option to set MaxRamSize manually to restrict the JVM to not use memory beyond this. But I have not seen any documentation of the same. I
I found the reference
https://chriswhocodes.com/hotspot_options_jdk11.html?s=MaxRam
But as Stephen C suggests it is probably just the B
NOTE: This is the maximum RAM size used to calculate the default Heap and Direct memory maximum. It doesn't provide a greater enforcement.
Real memory size (in bytes) used to set maximum heap size
and for another parameter
Maximum ergonomically set heap size (in bytes); [the default] zero means use MaxRAM * MaxRAMPercentage / 100
In the Oracle/OpenJDK there is no obvious option.
$ java -version -XX:+PrintFlagsFinal | grep -i MaxRAM
However, on Linux you can set the maximum memory size with ulimit
however this will hard crash the JVM if reached.