C cyiwin Active Member Licensed User Longtime User Apr 23, 2014 #1 I'm really enjoying B4J! My app runs for about an hour before it dies with this error. java.lang.OutOfMemoryError: Java heap space Click to expand... I've followed the instructions from this website to increase my heap space to 1GB but according to VisualVM I'm still throttled at 268MB. I've also found this website that tells me to "use the cmd-line flags" and enter "java -Xmx6g myprogram". This may be a silly question but does any one know where these cmd-line flags are?
I'm really enjoying B4J! My app runs for about an hour before it dies with this error. java.lang.OutOfMemoryError: Java heap space Click to expand... I've followed the instructions from this website to increase my heap space to 1GB but according to VisualVM I'm still throttled at 268MB. I've also found this website that tells me to "use the cmd-line flags" and enter "java -Xmx6g myprogram". This may be a silly question but does any one know where these cmd-line flags are?
NJDude Expert Licensed User Longtime User Apr 23, 2014 #2 Try adding this line to your manifest: Code: Copy SetApplicationAttribute(android:largeHeap, "true") Note that this only works on Android version > = 3 (SDK 11) Last edited: Apr 23, 2014 Upvote 0
Try adding this line to your manifest: Code: Copy SetApplicationAttribute(android:largeHeap, "true") Note that this only works on Android version > = 3 (SDK 11)
Erel B4X founder Staff member Licensed User Longtime User Apr 24, 2014 #3 See this tutorial (last section): http://www.b4x.com/android/forum/threads/parsing-huge-text-files.34923/ The VirtualMachineArgs attribute only affects the program when it runs from the IDE. You will need to set the same arguments with a batch file (or script) when you run the program outside of the IDE. Upvote 0
See this tutorial (last section): http://www.b4x.com/android/forum/threads/parsing-huge-text-files.34923/ The VirtualMachineArgs attribute only affects the program when it runs from the IDE. You will need to set the same arguments with a batch file (or script) when you run the program outside of the IDE.