summaryrefslogtreecommitdiff
path: root/libutils/Unicode.cpp
diff options
context:
space:
mode:
authorSandeep Patil <sspatil@google.com>2018-11-20 09:31:36 -0800
committerSandeep Patil <sspatil@google.com>2018-12-05 09:31:10 -0800
commitc6497eb1dc39294f017de06f97739ea7bcb964fb (patch)
treef17b2a39e75216a69adcbdccd2c0eb9e3d0f3a07 /libutils/Unicode.cpp
parentf12919935099acefa0b3e34e2ee36db85e2165b0 (diff)
libmeminfo: defer maps reading only when required for procmeminfo
This restores the original behavior. The main reason it should be this way is to make the class generic for all things memory under /proc/<pid>/. For example, with the current behavior, a program that only needs to read /proc/<pid>/smaps_rollup will end up wasting time and memory by parsing /proc/<pid>/maps when the object is being constructed. Same goes for a program that only wants to reset the working set. The 'ProcMemInfo' object still retains the property that it can only be used once to read maps and the object must be destroyed + recreated to update the stats. Bug: 114325007 Bug: 111694435 Test: libmeminfo_test 1 Test: # adb push /google/data/ro/users/ss/sspatil/test-memutils.sh /data/local/tmp/ # adb push procmem2 /data/local/tmp && adb push procrank2 /data/local/tmp # adb root && adb shell $ cd /data/local/tmp/ $ chmod +x test-memutils.sh $ ./test-memutils.sh 2>&1 | tee test.log Change-Id: I856d3b78a0088cff02cbd010b29ffbe0e35f5ee2 Signed-off-by: Sandeep Patil <sspatil@google.com>
Diffstat (limited to 'libutils/Unicode.cpp')
0 files changed, 0 insertions, 0 deletions