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
1 file changed