diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-11-26 11:21:15 -0800 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-11-26 16:06:35 -0800 |
commit | 91c2f0cde2a009bd52aa1c3d1dee705cc02c932f (patch) | |
tree | 55c02c51308df051c76d89a09627ad16d8f45f72 /runtime/indirect_reference_table.h | |
parent | bd6bb37c377e78aeafb4faf9acd70efbcbc62d30 (diff) | |
download | art-91c2f0cde2a009bd52aa1c3d1dee705cc02c932f.zip art-91c2f0cde2a009bd52aa1c3d1dee705cc02c932f.tar.gz art-91c2f0cde2a009bd52aa1c3d1dee705cc02c932f.tar.bz2 |
Trim reference tables when we trim the heap
Before:
System server:
virtual shared shared private private
size RSS PSS clean dirty clean dirty # object
2200 300 229 0 80 0 220 77 /dev/ashmem/dalvik-indirect ref table (deleted)
Location:
1896 128 102 0 28 0 100 39 /dev/ashmem/dalvik-indirect ref table (deleted)
After:
virtual shared shared private private
size RSS PSS clean dirty clean dirty # object
System server:
2216 64 64 0 0 0 64 79 /dev/ashmem/dalvik-indirect ref table (deleted)
Location:
2120 48 48 0 0 0 48 67 /dev/ashmem/dalvik-indirect ref table (deleted)
No pause time regression measured in memalloc test.
(cherry picked from commit 84dc99d2fa67e5dff018685661cb2bff62132989)
Change-Id: I80d9bd3b98e888fa8f77d03df69f8479ed209986
Diffstat (limited to 'runtime/indirect_reference_table.h')
-rw-r--r-- | runtime/indirect_reference_table.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/indirect_reference_table.h b/runtime/indirect_reference_table.h index 168f9f2..fbd5714 100644 --- a/runtime/indirect_reference_table.h +++ b/runtime/indirect_reference_table.h @@ -331,6 +331,9 @@ class IndirectReferenceTable { return Offset(OFFSETOF_MEMBER(IndirectReferenceTable, segment_state_)); } + // Release pages past the end of the table that may have previously held references. + void Trim() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); + private: // Extract the table index from an indirect reference. static uint32_t ExtractIndex(IndirectRef iref) { |