madvise away app image dex cache arrays
This saves ram and PSS by reducing the number of mapped pages. Also
PROT_NONE the dex cache arrays section to make accesses fault.
virtual shared shared private private
size RSS PSS clean dirty clean dirty swap
-------- -------- -------- -------- -------- -------- -------- --------
Before:
/data/app/com.facebook.katana-2/oat/arm/base.art
52484 52144 43522 17244 0 0 34900 0
/data/app/com.google.android.apps.maps-2/oat/arm/base.art
6876 6816 6816 0 0 2008 4808 0
After:
/data/app/com.facebook.katana-2/oat/arm/base.art
52484 49204 42032 14344 0 0 34860 0
/data/app/com.google.android.apps.maps-2/oat/arm/base.art
6876 6388 6388 0 0 1584 4804 0
Bug: 22858531
Change-Id: I87888a7c1518a92736dbd29eed338e7472ae3587
1 file changed