Runtime.getRuntime().freeMemory()
-
20-09-2019 - |
Question
Does Runtime.getRuntime().freeMemory() return the free heap memory space or heap + non-heap memory space?
Solution
javadoc says:
@return an approximation to the total amount of memory currently available for future allocated objects, measured in bytes.
This means heap space.
OTHER TIPS
its free heap memory space. and it will be in bytes
As far as I'm aware its the free heap memory, it certainly is on mobile Java.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow