top(1): restore size for kern.cp_times
Restore last minute change that broke top(1).
This commit is contained in:
parent
5bdd850968
commit
a2cda47ac3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334557
@ -384,6 +384,7 @@ machine_init(struct statics *statics)
|
||||
times = calloc(maxcpu * CPUSTATES, sizeof(long));
|
||||
if (times == NULL)
|
||||
err(1, "calloc %zu bytes", size);
|
||||
size = sizeof(long) * maxcpu * CPUSTATES;
|
||||
if (sysctlbyname("kern.cp_times", times, &size, NULL, 0) == -1)
|
||||
err(1, "sysctlbyname kern.cp_times");
|
||||
pcpu_cp_time = calloc(1, size);
|
||||
|
Loading…
Reference in New Issue
Block a user