I did a test on Android 4.4 Kit Kat where i allocated 100MB, and checked the process memory via
adb shell dumpsys meminfo -d and saw the
Dalvik Heap breakdown:
Heap Size and
Heap Alloc increased.
I also checked system memory via
adb shell cat /proc/meminfo and saw how much free memory it has.
Then i released the memory (and even called
I then checked the process memory again and saw that in
Dalvik Heap breakdown
Heap Size remains the same,
Heap Alloc decreased and
Heap Free increased!
I also run
adb shell cat /proc/meminfo and saw that the system didn't reclaim any memory!
I don't understand what's going on.
When i did the same test on Android 7.1 and Android 5.0, the memory was reclaimed upon releasing it!