runtime: Mmap uncompressed dex files (in zip) as clean memory
Saves 3MB of RAM (system-wide) in AGSA (search toolbar).
Also makes 3MB of RAM clean (previously dirty).
----
classes.dex from different processes will now have
their memory shared (as clean) globally.
To take advantage of this, the app/service just
needs to build their .JARs zipaligned and with
classes.dex being stored uncompressed.
-----
classes[N].dex within ZIP files will now get memory-mapped
as file-backed, clean memory when opening a DexFile.
(The zip entry must be at least 4-byte aligned).
Compressed DEX files still get extracted first to dirty memory.
Test: art/tools/run-test 071-dexfile-map-clean
Bug: 27650033
Change-Id: I18efbd392c5980ffe0d983833b6cc581e0237b92
11 files changed