]> granicus.if.org Git - procps-ng/commitdiff
make top even buggier
authoralbert <>
Sun, 13 Oct 2002 19:22:26 +0000 (19:22 +0000)
committeralbert <>
Sun, 13 Oct 2002 19:22:26 +0000 (19:22 +0000)
ps/module.mk
top.c

index c237cceab0671cd71db0e427742e44c32bced288..450b329f9d8ac6eb4654eb0f56bbc072075cef5c 100755 (executable)
@@ -1,6 +1,6 @@
 # This file gets included into the main Makefile, in the top directory.
 
-INSTALL += $(bin)ps
+INSTALL += $(bin)ps $(man1)ps.1
 
 # files to remove
 CLEAN += ps/ps ps/debug
diff --git a/top.c b/top.c
index e2eb505eb63ee7a0d29f2ef9f5e714057dbfc73f..ce7229755ad602c7f33adfb26ecefaaf9186b817 100644 (file)
--- 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);