Hiya
@ilan
Hmm, I've just got back in and thought to myself that you can probably use Windows environment variables to fix your problem.
My variables already have the following setup '-Xmx1024m -Xms1024m', You can just add more options like '-XX:-UseGCOverheadLimit'.
I've just decided to add '-XX:-UseGCOverheadLimit' to the end of my _JAVA_OPTIONS variables, so now mine reads as follows
'-Xmx1024m -Xms1024m -XX:-UseGCOverheadLimit', give it a go it will not hurt.
When ran in B4J the logs will say that it has pick up Java options, nothing appears in B4A logs when ran but java options are still executed.
That's my way of fixing memory issues and using java options, yes there are other ways to do it but this works for me.
I believe that using #VirtualMachineArgs in B4J is basically the same as setting it up as in the screenshot above. it would be nice to have #VirtualMachineArgs in B4A, but it does not have it so I use Windows environment variables.
This is where Erel responds by saying there is an easier way

, but this way it's set all the time when Windows is loaded.