1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 09:44:04 +00:00

mem_vsize and mem_res need to be 64 bit (sf.net #3366272)

if process allocated 4GiB or more of ram then {top mem_vsize} did not report correct number

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
This commit is contained in:
Peter Hercek 2011-07-13 19:35:59 +02:00 committed by Pavel Labath
parent b3d96b3b34
commit eada1d62c7
2 changed files with 3 additions and 3 deletions

View File

@ -237,7 +237,7 @@ static int process_parse_stat(struct process *process)
strncpy(procname, lparen + 1, rc);
procname[rc] = '\0';
rc = sscanf(rparen + 1, "%3s %*s %*s %*s %*s %*s %*s %*s %*s %*s %*s %lu "
"%lu %*s %*s %*s %d %*s %*s %*s %u %u", state, &process->user_time,
"%lu %*s %*s %*s %d %*s %*s %*s %llu %llu", state, &process->user_time,
&process->kernel_time, &nice_val, &process->vsize, &process->rss);
if (rc < 6) {
NORM_ERR("scaning data for %s failed, got only %d fields", procname, rc);

View File

@ -111,8 +111,8 @@ struct process {
unsigned long previous_user_time;
unsigned long previous_kernel_time;
unsigned long total_cpu_time;
unsigned int vsize;
unsigned int rss;
unsigned long long vsize;
unsigned long long rss;
#ifdef IOSTATS
unsigned long long read_bytes;
unsigned long long previous_read_bytes;