I am creating a control panel for java based game servers and wanted to kno how to assign all available system memory for the jvm. So, instead of just using say -Xmx512M, i would use a flag that will automatically assign all the system memory.
I know it is not recommended to assign all of the memory but I just want to do it.
If you use something like Waratek JVM you will be able to hook into the api or MBeans to control it.
BTW when allocating memory, the JVM will look to use contiguous memory otherwise it will fail, so even though you have 100MB free, unless it is contiguous you may not be able to use it all.