diff options
author | Riddle Hsu <riddlehsu@google.com> | 2019-03-05 23:18:13 +0800 |
---|---|---|
committer | Riddle Hsu <riddlehsu@google.com> | 2019-03-05 23:18:13 +0800 |
commit | 282cf6ea40edb549dbb0aa0f055852a02ed450a0 (patch) | |
tree | 9e876ca7346081d1d7d29f22c46b4307980d1d1d /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 5af401bd35a188a4a8c928f66993bf2c22247f2c (diff) |
Fix missing incremental process starting position of LRU list
When searching insertion position for a process with clients activities,
if the position goes to mLruProcessActivityStart but we don't increase
mLruProcessActivityStart, it will be like hide a slot. Then when removing
the process from LRU, the starting position will be decreased, that causes
a slot is lost. After this condition happens many times, the starting
position (mLruProcessServiceStart in the practical case) becomes a negative
number which leads to IndexOutOfBoundsException.
The expected example:
Assume to insert a new process X to [2]:
[0]A
[1]B
[2]C <- mLruProcess(Activity/Service)Start
[3]D
After insertion, the starting position increased:
[0]A
[1]B
[2]X
[3]C <- mLruProcess(Activity/Service)Start
[4]D
Bug: 126427214
Test: Build system/extras/tests/memeater and push to device.
Execute multiple memeater instances to consume most of RAM.
Observe home is being killed and restarted frequently for a
long time without IndexOutOfBoundsException from LRU list.
Change-Id: I8a925aa320141e55e18fa4312ba91cb628bcc47d
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions