OSDN Git Service

Fix reading memory usage for 64-bit processes
authorColin Cross <ccross@android.com>
Tue, 17 Jun 2014 22:18:07 +0000 (15:18 -0700)
committerColin Cross <ccross@android.com>
Tue, 17 Jun 2014 22:25:45 +0000 (15:25 -0700)
commit0c6bc73c5e12dd4caae5bf3acbf1d26c3a9ad130
treecc2b5404b0885ed585d79cf2c248c6c6bff25ade
parent18cd9f57621b47889bdf81b2b04413569a999ef4
Fix reading memory usage for 64-bit processes

64-bit process will have virtual addresses that don't fit in an
unsigned long if ActivityManagerService is in a 32-bit process,
and the locations of the '-' and ' ' characters in the maps
are not predictable.  Fix the sscanf for finding the start of the
mapping, and use it again to find the end of the mapping.  Also
fix a few 64-bit warnings.

Change-Id: I8855c76085142768be1d45346f1032fd37cbe4eb
core/jni/android_os_Debug.cpp