OSDN Git Service

Better handling for the process info array
authorKenny Root <kroot@google.com>
Tue, 21 Sep 2010 17:46:57 +0000 (10:46 -0700)
committerKenny Root <kroot@google.com>
Tue, 21 Sep 2010 22:49:10 +0000 (15:49 -0700)
commit16abe7acb8f1dbeb8b9b1dc41061a53dcbfea851
tree97bf028f7ecbe2ae950264422c322df0306e3a19
parentcd23be01be219a927cb4eb9edc088eaec260cdba
Better handling for the process info array

We have phones that have more than 256 PIDs running at one time right
now, so don't segmentation fault when that condition happens.

Free all proc info after it ahs been used.

Also if a process goes away before we read its process name, just print
"<unknown>" instead.

Change-Id: Ia3899be61b047852f62bf3cc6f30eb2fcd797a61
procrank/Android.mk
procrank/procrank.c