summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/procmap.c6
-rw-r--r--sysdeps/linux/procmap.c3
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/procmap.c b/examples/procmap.c
index a3de5bf1..46a3a1ea 100644
--- a/examples/procmap.c
+++ b/examples/procmap.c
@@ -140,9 +140,9 @@ main (int argc, char *argv [])
}
- g_print("smaps flags:%#llx size:%llu rss:%llu "
- "shared_clean:%llu shared_dirty:%llu "
- "private_clean:%llu private_dirty: %llu\n",
+ g_print("smaps flags:%#llx size:%lluKiB rss:%lluKiB "
+ "shared_clean:%lluKib shared_dirty:%lluKiB "
+ "private_clean:%lluKiB private_dirty: %lluKiB\n",
maps[i].flags,
maps[i].size >> 10,
maps[i].rss >> 10,
diff --git a/sysdeps/linux/procmap.c b/sysdeps/linux/procmap.c
index e66146d5..f5638bda 100644
--- a/sysdeps/linux/procmap.c
+++ b/sysdeps/linux/procmap.c
@@ -164,11 +164,10 @@ glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
if (getline(&line, &line_size, maps) == -1)
break;
- /* 8 arguments */
if (sscanf(line, PROC_MAPS_FORMAT,
&start, &end, flags, &offset,
&dev_major, &dev_minor, &inode, &line_end) != 7)
- break;
+ continue;
filename = line + line_end;
g_strstrip(filename);