The android documentation for the java.lang.Runtime class makes multiple reference to the JVM, for example calling the freeMemory()
method:
Returns the amount of free memory in the Java Virtual Machine.
Yet in recent versions of android there is no virtual machine. What exactly does this method, and other similar methods, return?
If I'm not mistaken, this is what gets call at the platform level from the Runtime::freememory()
method: https://android.googlesource.com/platform/art/+/refs/tags/android-9.0.0_r51/openjdkjvm/OpenjdkJvm.cc#297 which then calls https://android.googlesource.com/platform/art/+/refs/tags/android-9.0.0_r51/runtime/gc/heap.h#548.
You can keep digging if you want to get to the very bottom of it, but it seems the ART is trying to provide a valid value to the calling app.