projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6af732b
)
top: add tie breaking for topmem mode
author
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 13 Jul 2010 10:13:04 +0000
(12:13 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Tue, 13 Jul 2010 10:13:04 +0000
(12:13 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
procps/top.c
patch
|
blob
|
history
diff --git
a/procps/top.c
b/procps/top.c
index 04dd82633849eab924b731f2df5603d0a7daa8f7..ec8437442d37332b22cdca1b577010b947f06ae7 100644
(file)
--- a/
procps/top.c
+++ b/
procps/top.c
@@
-686,10
+686,10
@@
static int topmem_sort(char *a, char *b)
n = offsetof(topmem_status_t, vsz) + (sort_field * sizeof(mem_t));
l = *(mem_t*)(a + n);
r = *(mem_t*)(b + n);
-
//
if (l == r) {
-
// l = a->mapped_rw
;
-
// r = b->mapped_rw
;
-
//
}
+
if (l == r) {
+
l = ((topmem_status_t*)a)->dirty
;
+
r = ((topmem_status_t*)b)->dirty
;
+
}
/* We want to avoid unsigned->signed and truncation errors */
/* l>r: -1, l=r: 0, l<r: 1 */
n = (l > r) ? -1 : (l != r);