summaryrefslogtreecommitdiff
path: root/top.c
diff options
context:
space:
mode:
authoralbert <>2002-10-13 19:22:26 +0000
committeralbert <>2002-10-13 19:22:26 +0000
commite3c542d8a3df7a8f6dd10c81c6026d70b6a59eb6 (patch)
treee40eb7367aa13337d7ec50aad28864d0cbd7deb3 /top.c
parent1f954c1e44b60dda019d446609c4239ec63949fa (diff)
downloadprocps-ng-e3c542d8a3df7a8f6dd10c81c6026d70b6a59eb6.tar.gz
make top even buggier
Diffstat (limited to 'top.c')
-rw-r--r--top.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/top.c b/top.c
index e2eb505..ce72297 100644
--- a/top.c
+++ b/top.c
@@ -1747,7 +1747,6 @@ static void frame_states (proc_t **ppt, int show)
HIST_t *hist_tmp;
if (!hist_sav) { // 1st time through
- Frame_maxtask = 0;
hist_siz = 100;
hist_sav = alloc_c(sizeof(HIST_t)*hist_siz);
hist_new = alloc_c(sizeof(HIST_t)*hist_siz);
@@ -1783,7 +1782,7 @@ static void frame_states (proc_t **ppt, int show)
running++;
break;
}
- if (total >= hist_siz) {
+ if (total+1 >= hist_siz) {
hist_siz = hist_siz * 5 / 4 + 1; // grow by at least 25%
hist_sav = alloc_r(hist_sav, sizeof(HIST_t)*hist_siz);
hist_new = alloc_r(hist_new, sizeof(HIST_t)*hist_siz);