summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorSandeep Patil <sspatil@google.com>2018-11-20 17:26:56 -0800
committerSandeep Patil <sspatil@google.com>2018-11-21 14:51:20 -0800
commitd70e20218ae3a189c72e179e5f7ec7faa918a1c5 (patch)
tree54f927eca6e044b0f18ff0445400c0a8223fede9 /tools/aapt2/java/JavaClassGenerator_test.cpp
parentd0f47278c4dae7274d6437942f2fca23c148f803 (diff)
Fix vmalloc memory usage parsing.
The size in /proc/vmallocinfo actually represents the size of the virtual region and not the size of memory allocated for the same. So, we have been over counting vmalloc memory usage in most cases leading into negative "Lost RAM". Moreover, as of kernel 4.14, binder allocations that were ignored before are now counted as vmalloc allocations since binder started using the 'vmalloc' flag instead of 'ioremap' flag for its vm area allocations. See: https://android.googlesource.com/kernel/common/+/86eda3864a704a98d5444ae60654b898731bfea5 .. This makes the problem even worse for devices that are running kernel 4.14 and beyond. Fix that by looking specifically for "pages=" in each line of /proc/vmallocinfo to get the number of physical pages associated with the particular allocation. Bug: 119639955 Test: 'dumpsys meminfo' before and after on cuttlefish running 4.14 kernel. Result: Lost RAM (before) : -151,462K Lost RAM (after) : -5,312K Change-Id: I3d677572613392383ee8ea0968bde0e0913c42cf Signed-off-by: Sandeep Patil <sspatil@google.com>
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions