OSDN Git Service

Add notion of released vs empty pages to ROSAlloc.
authorMathieu Chartier <mathieuc@google.com>
Tue, 24 Jun 2014 21:48:59 +0000 (14:48 -0700)
committerMathieu Chartier <mathieuc@google.com>
Thu, 10 Jul 2014 00:29:18 +0000 (17:29 -0700)
commita5b5c55c8585b7ce915f0c7e1f66d121a7f7a078
treebe7436ff11debe0ca7ef63503436127f4fdc4a5b
parent5de52242f3934f1604083d7215cdde1d0cc8ba7a
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
getting dirtied.

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.

Bug: 9969166

Change-Id: I4012e0a2554f413d18efe1a0371fe18d1edabaa9
runtime/gc/allocator/rosalloc.cc
runtime/gc/allocator/rosalloc.h
runtime/gc/heap.cc
runtime/gc/heap.h