diff options
| author | Suren Baghdasaryan <surenb@google.com> | 2019-11-25 19:05:45 -0800 |
|---|---|---|
| committer | Suren Baghdasaryan <surenb@google.com> | 2019-12-19 05:23:55 +0000 |
| commit | c94063b44ea0912baab2cf973485d6a532a3bb64 (patch) | |
| tree | 23509bfc847f90f01eb20d623e4d4fa8f778944f /include | |
| parent | 54d365448fc490517e7c73bdffc74221bcfefbe1 (diff) | |
| download | platform_system_memory_libmeminfo-c94063b44ea0912baab2cf973485d6a532a3bb64.tar.gz platform_system_memory_libmeminfo-c94063b44ea0912baab2cf973485d6a532a3bb64.tar.bz2 platform_system_memory_libmeminfo-c94063b44ea0912baab2cf973485d6a532a3bb64.zip | |
libmeminfo: add API to read ION heap and pool allocation sizes
Add APIs to read sysfs nodes exposed by ION driver.
Bug: 138148041
Test: dumpsys meminfo
Test: libmeminfo_test
Change-Id: I1217e5cea037346066120f7037a39aa6e73bb503
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/meminfo/sysmeminfo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/meminfo/sysmeminfo.h b/include/meminfo/sysmeminfo.h index f533d8c..0cf41d4 100644 --- a/include/meminfo/sysmeminfo.h +++ b/include/meminfo/sysmeminfo.h @@ -91,5 +91,13 @@ class SysMemInfo final { // _always_ mapped in a process and are counted for in each process. uint64_t ReadVmallocInfo(const std::string& path = "/proc/vmallocinfo"); +// Read ION heaps allocation size in kb +bool ReadIonHeapsSizeKb( + uint64_t* size, const std::string& path = "/sys/kernel/ion/total_heaps_kb"); + +// Read ION pools allocation size in kb +bool ReadIonPoolsSizeKb( + uint64_t* size, const std::string& path = "/sys/kernel/ion/total_pools_kb"); + } // namespace meminfo } // namespace android |
