Last active
May 9, 2021 13:56
-
-
Save iflove/87114fc7ef4ba3b7a20819b960b4eaee to your computer and use it in GitHub Desktop.
Android应用与系统稳定性
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FD泄露 |
System_Server与Zygote共存亡
System_Server 进程意外崩溃或者被退出,Zygote也终结重新开始
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Android应用与系统稳定性——FD泄露
内核进程结构体task_struct中为每个进程维护了一个数组,数组下标就是fd,里面存储的是对这个文件的描述了。
ls -l /proc/进程PID/fd/
;进程线程信息:ps -t <pid>
;lsof -p <pid>
;Tombstone文件中有open files
;/proc/pid/status中threads项(当前线程数目)
,/proc/pid/task来监控线程使用情况