diff --git a/src/memory.cpp b/src/memory.cpp index 9102352e..c360e976 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -114,8 +114,8 @@ void update_procmem() static auto pageSize = sysconf(_SC_PAGESIZE); if (pageSize < 0) pageSize = 4096; - long int temp[7]; - if (fscanf(statm, "%ld %ld %ld %ld %ld %ld %ld", + long long int temp[7]; + if (fscanf(statm, "%lld %lld %lld %lld %lld %lld %lld", &temp[0], &temp[1], &temp[2], &temp[3], &temp[4], /* unused since Linux 2.6; always 0 */ &temp[5], &temp[6]) == 7) diff --git a/src/memory.h b/src/memory.h index c48603ac..33fe846f 100644 --- a/src/memory.h +++ b/src/memory.h @@ -17,8 +17,8 @@ struct memory_information { struct process_mem { - float virt, resident, shared; - long int text, data, dirty; + int64_t virt, resident, shared; + int64_t text, data, dirty; }; extern process_mem proc_mem;