Track the child processes that are forked by app processes
Apps could use Runtime.exec() to spawn child process and framework will have no idea about its lifecycle. Now track those processes whenever we find them - currently during the cpu stats sampling they could be spotted. If it's consuming too much CPU while its parent app process are also in the background, kill it. By default we allow up to 32 such processes; the process with the worst oom adj score of their parents will be killed if there are too many of them. Bug: 160548789 Bug: 157089413 Test: atest AppChildProcessTest Test: atest CtsAppTestCases:ActivityManagerTest Change-Id: I95b20a1f36ccd43d09027201d14872305b169d8d
Loading
Please register or sign in to comment