summaryrefslogtreecommitdiff
path: root/libs/appfunctions/java
diff options
context:
space:
mode:
author Yasin Kilicdere <tyk@google.com> 2024-10-09 16:09:23 +0000
committer Yasin Kilicdere <tyk@google.com> 2024-10-09 16:09:23 +0000
commit51e01e9f395a1418c470d346ed2ed66d84eb239f (patch)
treeb828472f764975a9fd97abb7907fc61bb86cc4c9 /libs/appfunctions/java
parent3b0072a7e83d39b8eeee9ca2173d07cac147fa6d (diff)
Preserve the LRU positions of its processes when an app is resumed.
When a multiprocess app is sent to background and brought back, the relative positions of its processes in the process LRU list was being scrambled due to the connections being stored in an ArraySet, based on the object's hash value, which is random. With this CL, updateLruProcessInternalLSP method is split into two stages (offerLruProcessInternalLSP and completeLruProcessInternalLSP) having a priority queue in between that stores and sorts the lrui (lru index) to preserve the positions of the processes in the LRU list relative to each other. Otherwise, when there is memory pressure, LMKD (Low Memory Killer Daemon) was killing these processes in an undesired order. Bug: 359930209 Change-Id: Ia6270dc779dcf959a7c58c836c28a0155dee5215 Test: atest CtsAppTestCases:ServiceTest#testActivityServiceBindingLru Flag: EXEMPT bugfix
Diffstat (limited to 'libs/appfunctions/java')
0 files changed, 0 insertions, 0 deletions