25 lines
994 B
Plaintext
25 lines
994 B
Plaintext
$OpenBSD: patch-src_load-graph_cpp,v 1.2 2011/05/26 07:31:01 jasper Exp $
|
|
|
|
It's much more intuitive for the user to see the memory usage values
|
|
aligning with the familiar information presented by top(1).
|
|
|
|
XXX: When gtop2's mem.cached is implemented,
|
|
adjust mem.user and remove this patch.
|
|
|
|
--- src/load-graph.cpp.orig Tue Sep 28 01:13:17 2010
|
|
+++ src/load-graph.cpp Wed May 25 12:03:52 2011
|
|
@@ -360,11 +360,11 @@ get_memory (LoadGraph *g)
|
|
|
|
/* There's no swap on LiveCD : 0.0f is better than NaN :) */
|
|
swappercent = (swap.total ? (float)swap.used / (float)swap.total : 0.0f);
|
|
- mempercent = (float)mem.user / (float)mem.total;
|
|
+ mempercent = (float)mem.used / (float)mem.total;
|
|
|
|
set_memory_label_and_picker(GTK_LABEL(g->labels.memory),
|
|
GSM_COLOR_BUTTON(g->mem_color_picker),
|
|
- mem.user, mem.total, mempercent);
|
|
+ mem.used, mem.total, mempercent);
|
|
|
|
set_memory_label_and_picker(GTK_LABEL(g->labels.swap),
|
|
GSM_COLOR_BUTTON(g->swap_color_picker),
|