質問

In android studio I have this logcat entry:

01-01 01:03:22.085    1058-1252/co.uk.dawut.application D/dalvikvm﹕ GC_FOR_MALLOC freed 18219 objects / 1078872 bytes in 114ms

And running "ps x" it shows that 1058 is a process number. What is 1252?

役に立ちましたか?

解決

While I can't duplicate that display, it would make sense that this is probably a thread ID.

On linux a thread ID has the same form as a process ID and they exist in a common number space (effectively, a thread is a sort of junior, dependent process that shares an address space with the others).

If you type adb shell ps -t you will see every thread, with the first numeric column being the thread ID rather than the process ID. For the original thread in each process, the thread ID and the process ID will match. For the other threads, it seems as if the second numeric field which is normally the ID of the parent process (for an app, that would typically by zygote), instead shows the process ID of the owning process.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top