Add notion of released vs empty pages to ROSAlloc.
A notion of released vs empty pages helps get a more accurate view of
how much memory was released during heap trimming. Otherwise we get
that the same pages possibly get madvised multiple times without
Also enabled heap trimming of rosalloc spaces even when we care about
jank. This is safe to do since the trimming process only acquires
locks for short periods of time.
Dalvik PSS reduces from ~52M to ~50M after boot on N4.
4 files changed