Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2019-07

PPCJVM Android JVM target technical questions

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mgr. Janusz Chmiel

Dear developers,
Because my apps will be longer and longer, I have some special technical question to you.
How many lines can PPCJVM compile while using one source file without units? How many values can be processed by using Case block? For example max 200 or similar value?
How to manage memory while using JVM Android target? Which commands or strategies can I use to minimize RAM overload?
If I will type
r='';
Will it deallocate allocated bytes for previously used value of string variable?
Sure, I know, that some special processes are not under my control. Such as when I will call some Android API function, The memory allocations will raise and I can not control it. I can only free previously called methods but memory allocations are on The control of Google Engineers, who ahave created specific API functions and methods or Android classes.
Sure, I Am using The latest ppcjvm.exe which is The part of Lazarus package.

Reply by email

Jonas Maebe
to Mgr. Janusz Chmiel
Mgr. Janusz Chmiel wrote
Because my apps will be longer and longer, I have some special technical question to you. How many lines can PPCJVM compile while using one source file without units?

I don't think there is a limit. There is only a limit per function/procedure/method: they cannot contain more than 64KB of java bytecode. I don't know exactly to how many lines of source code this corresponds (it probably depends on what the source code does, as some source code results in longer java byte code than other).

How many values can be processed by using Case block? For example max 200 or similar value?

Same answer as above.

Show quoted text 6 lines
How to manage memory while using JVM Android target? Which commands or strategies can I use to minimize RAM overload? If I will type r=''; Will it deallocate allocated bytes for previously used value of string variable?

After that statement has executed, the memory will be deallocated the next time the garbage collector runs.

Jonas

Reply by email

Mgr. Janusz Chmiel
to Jonas Maebe

Please, how I could generate Android.pas and android.inc from The newest Android Platformtools? I think that android.jar is being used for this purposes.
But.
Is it possible to use newer Platform tools such as Android 22? Or unfortunately, Google have made some restrictions so it is not possible to use newest Android platform tools to generate android.inc and android.pas?
Thank you very much for yours answer.

Reply by email