1 2 #pragma once 3 4 #include <inttypes.h> 5 #include <sys/types.h> 6 7 namespace GpuSysfsReader { 8 uint64_t getDmaBufGpuMem(pid_t pid = 0); 9 uint64_t getGpuMemTotal(pid_t pid = 0); 10 uint64_t getPrivateGpuMem(pid_t pid = 0); 11 12 constexpr char kSysfsDevicePath[] = "/sys/class/misc/mali0/device"; 13 constexpr char kProcessDir[] = "kprcs"; 14 constexpr char kMappedDmaBufsDir[] = "dma_bufs"; 15 constexpr char kTotalGpuMemNode[] = "total_gpu_mem"; 16 constexpr char kDmaBufGpuMemNode[] = "dma_buf_gpu_mem"; 17 } // namespace GpuSysfsReader 18