summaryrefslogtreecommitdiff
path: root/libs/battery/LongArrayMultiStateCounterTest.cpp
diff options
context:
space:
mode:
author Martijn Coenen <maco@google.com> 2021-09-03 18:06:24 +0200
committer Martijn Coenen <maco@google.com> 2021-09-24 09:09:19 +0200
commit3b2091fab363c13bf2b1dde89a0eef097985c619 (patch)
tree88a6c66224cc4cf53a5eff54fc4cabdbd2d68905 /libs/battery/LongArrayMultiStateCounterTest.cpp
parent4095348d8f6d5472289eecebe03ecd667684c247 (diff)
Repeat proxy limit callbacks if we keep going above the limit.
When we hit the high watermark for number of live proxies in a process, we call a callback with the offending UID. ActivityManagerService will then kill all processes belonging to this UID. The proxy limit callback is only "re-armed" when the number of proxies for that UID drops below a certain value again. However, because the proxies beloging to the now dead processes will only be removed when the GC next runs, and restarted processes may start adding new proxies in the mean time, we may actually never drop below the lower threshold again, and never fire the callback again, despite an ever-increasing amount of proxies. To prevent this, repeatedly fire the limit callback every time that we go another # of high watermark proxies over the limit. This, in combination with a GC in the framework, should make sure that we regularly kill and clean up these processes. Bug: 198340142 Test: Manual Change-Id: I8d877d409863fdae9cffd43709b647d0c1edb440 Merged-In: I8d877d409863fdae9cffd43709b647d0c1edb440
Diffstat (limited to 'libs/battery/LongArrayMultiStateCounterTest.cpp')
0 files changed, 0 insertions, 0 deletions