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-06 12:50:38 +0200
commita8d509dee235ac3b81e788f4c04247a95f95e11e (patch)
tree2a32d6e43cfd789db72cc3c26a1f6be0f719866e /libs/battery/LongArrayMultiStateCounterTest.cpp
parent20f5a270658bcdff7a4cc4f9f0059c572ca123eb (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 for every 1000 proxies that we go 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
Diffstat (limited to 'libs/battery/LongArrayMultiStateCounterTest.cpp')
0 files changed, 0 insertions, 0 deletions