[BACK]Return to vmstat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / systat

Diff for /src/usr.bin/systat/vmstat.c between version 1.37 and 1.38

version 1.37, 2002/12/16 01:57:04 version 1.38, 2003/02/28 21:29:07
Line 82 
Line 82 
         struct  vmtotal Total;          struct  vmtotal Total;
         struct  nchstats nchstats;          struct  nchstats nchstats;
         long    nchcount;          long    nchcount;
         long    *intrcnt;          int     *intrcnt;
 } s, s1, s2, z;  } s, s1, s2, z;
   
 #include "dkstats.h"  #include "dkstats.h"
Line 233 
Line 233 
                 }                  }
 #else  #else
                 nintr = (namelist[X_EINTRCNT].n_value -                  nintr = (namelist[X_EINTRCNT].n_value -
                     namelist[X_INTRCNT].n_value) / sizeof (long);                      namelist[X_INTRCNT].n_value) / sizeof (int);
                 intrloc = calloc(nintr, sizeof (long));                  intrloc = calloc(nintr, sizeof (long));
                 intrname = calloc(nintr, sizeof (long));                  intrname = calloc(nintr, sizeof (long));
                 intrnamebuf = malloc(namelist[X_EINTRNAMES].n_value -                  intrnamebuf = malloc(namelist[X_EINTRNAMES].n_value -
Line 648 
Line 648 
                 }                  }
         }          }
 #else  #else
         NREAD(X_INTRCNT, s->intrcnt, nintr * sizeof(long));          NREAD(X_INTRCNT, s->intrcnt, nintr * sizeof(int));
 #endif  #endif
         size = sizeof(s->time);          size = sizeof(s->time);
         if (sysctl(cp_time_mib, 2, &s->time, &size, NULL, 0) < 0) {          if (sysctl(cp_time_mib, 2, &s->time, &size, NULL, 0) < 0) {
Line 679 
Line 679 
 allocinfo(struct Info *s)  allocinfo(struct Info *s)
 {  {
   
         s->intrcnt = (long *) malloc(nintr * sizeof(long));          s->intrcnt = (int *) malloc(nintr * sizeof(int));
         if (s->intrcnt == NULL)          if (s->intrcnt == NULL)
                 errx(2, "out of memory");                  errx(2, "out of memory");
 }  }
Line 687 
Line 687 
 static void  static void
 copyinfo(struct Info *from, struct Info *to)  copyinfo(struct Info *from, struct Info *to)
 {  {
         long *intrcnt;          int *intrcnt;
   
         intrcnt = to->intrcnt;          intrcnt = to->intrcnt;
         *to = *from;          *to = *from;

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38