touchsquid Active Member Licensed User Longtime User Oct 9, 2011 #1 I have a large app which needs at least 32 MB heap size to work. Is there a function I can call from B4A to get the maximum VM heapsize? I posted this on Stack Overflow with no results. :sign0188:
I have a large app which needs at least 32 MB heap size to work. Is there a function I can call from B4A to get the maximum VM heapsize? I posted this on Stack Overflow with no results. :sign0188:
Erel B4X founder Staff member Licensed User Longtime User Oct 10, 2011 #2 This code returns the JVM maximum heap size: B4X: Dim r As Reflector r.Target = r.RunStaticMethod("java.lang.Runtime", "getRuntime", Null, Null) Dim maxMemory As Long maxMemory = r.RunMethod("maxMemory") I posted this on Stack Overflow with no results. Click to expand... Are you sure that you used the basic4android tag? I didn't see your message. Upvote 0
This code returns the JVM maximum heap size: B4X: Dim r As Reflector r.Target = r.RunStaticMethod("java.lang.Runtime", "getRuntime", Null, Null) Dim maxMemory As Long maxMemory = r.RunMethod("maxMemory") I posted this on Stack Overflow with no results. Click to expand... Are you sure that you used the basic4android tag? I didn't see your message.
touchsquid Active Member Licensed User Longtime User Oct 10, 2011 #3 Thanks Erel, exactly what I needed. Maybe I forgot the tag. Upvote 0