diff options
| author | Andy McFadden <fadden@android.com> | 2011-11-04 12:56:55 -0700 |
|---|---|---|
| committer | Andy McFadden <fadden@android.com> | 2011-11-04 13:06:04 -0700 |
| commit | af6cf54652d1b27885b99e216bee29b955052630 (patch) | |
| tree | 914acd163e35c069034aae38f01759fd7681c7c2 /vm/compiler/codegen/mips/CodegenFactory.cpp | |
| parent | ab97cd1634ed4e2c9e5c558a9f88ed9ca8623c8c (diff) | |
Reduce Dalvik card table overhead
The VM has a "growth limit" (e.g. 48MB) that is used to cap normal
apps, and a "max heap" (e.g. 128MB) that is used for apps with unusual
high-memory requirements. The Dalvik GC uses a 128:1 "card table"
that spans the entire managed heap, out to the "max heap" limit.
The table is erased during every concurrent GC. The first time
we do that post-zygote, the copy-on-write behavior causes physical
pages to be allocated. We're currently clearing out to the heap max,
not the growth limit, which means we have a bunch of physical memory
allocated for pages that will never be used.
This changes it so we only clear out to the growth limit. If the
growth limit is removed by the app, we clear out to the heap max.
On devices with a 128MB max heap, this reduces the private/dirty
usage for most apps by 640KB.
Bug 5567332
Change-Id: Iac633017c128d63b284d48016e47d40cc46df1de
Diffstat (limited to 'vm/compiler/codegen/mips/CodegenFactory.cpp')
0 files changed, 0 insertions, 0 deletions
