The scudo memory allocator will allocate a large virtual memory address that causes procrank to allocate a huge amount of data. Modify so it caches the data a bit at a time. Remove some allocations that are not necessary since the data is only used in the first loop. Fix a few pread64 checks against the actual bytes read, rather than the read is < 0. Fix sort by rss in procrank. Bug: 135694447 Test: Ran unit tests (only one unit test actually runs the modified code). Test: Ran the old version of procrank using a static libmeminfo and verified Test: that the same data is found as the new version. Change-Id: I8adc169b5607ec994ff13a9e161a479350d84c4d |
||
|---|---|---|
| .. | ||
| Android.bp | ||
| librank.cpp | ||
| procmem.cpp | ||
| procrank.cpp | ||
| showmap.cpp | ||
| wsstop.cpp | ||