]> granicus.if.org Git - procps-ng/commitdiff
not needed
authoralbert <>
Sun, 13 Oct 2002 19:47:56 +0000 (19:47 +0000)
committeralbert <>
Sun, 13 Oct 2002 19:47:56 +0000 (19:47 +0000)
top.c

diff --git a/top.c b/top.c
index ce7229755ad602c7f33adfb26ecefaaf9186b817..1e7e8486729ab42ca54bdbc315a06d2e05dc23fa 100644 (file)
--- a/top.c
+++ b/top.c
@@ -1746,12 +1746,6 @@ static void frame_states (proc_t **ppt, int show)
    unsigned         total, running, sleeping, stopped, zombie;
    HIST_t          *hist_tmp;
 
-   if (!hist_sav) {           // 1st time through
-      hist_siz = 100;
-      hist_sav = alloc_c(sizeof(HIST_t)*hist_siz);
-      hist_new = alloc_c(sizeof(HIST_t)*hist_siz);
-   }
-
    // reuse memory each time around
    hist_tmp = hist_sav;
    hist_sav = hist_new;
@@ -1783,7 +1777,7 @@ static void frame_states (proc_t **ppt, int show)
             break;
       }
       if (total+1 >= hist_siz) {
-         hist_siz = hist_siz * 5 / 4 + 1;  // grow by at least 25%
+         hist_siz = hist_siz * 5 / 4 + 100;  // 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);
       }